1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Neil McKechnie
10cd580061 Update I2CManager_NonBlocking.h
Missing initialisation of read buffer pointer!
2023-02-16 22:27:23 +00:00
Neil McKechnie
6b863ea483 Update I2CManager_NonBlocking.h
Cosmetic changes
2023-02-16 16:41:33 +00:00
Neil McKechnie
a9971968c0 Update I2CManager_NonBlocking.h
Reduce platform-specific part of ATOMIC_BLOCK definition to one inline function _getInterruptState()
2023-02-10 22:58:58 +00:00
Neil McKechnie
c315895cd9 Update I2CManager_NonBlocking.h
Rework ATOMIC_BLOCK to further simplify and clarify.
2023-02-10 19:52:24 +00:00
Neil McKechnie
ad4cedfccf Update I2CManager_NonBlocking.h
Rationalise ATOMIC_BLOCK macro definition and remove reliance on atomic.h.
2023-02-10 18:21:50 +00:00
Neil McKechnie
0b307a67e4 I2CManager: Update native drivers for MUX support from the common code. 2023-02-10 15:47:44 +00:00
Neil McKechnie
dd0ee8b50a Additional support for Extended I2C Addresses 2023-02-09 00:13:23 +00:00
Neil McKechnie
cb287f23a4 I2CManager: Add support for I2C Multiplexers to Wire and AVR.
AVR Native (non-blocking) driver now supports up to 8 I2C Multiplexers, as does any controller that uses Wire for I2C.
Other native drivers will be updated in due course.
2023-02-07 16:38:30 +00:00
Neil McKechnie
13bd6ef9eb HAL: Add support for Extended Addresses and I2C Multiplexer
Change I2C addresses from uint8_t to I2CAddress, in preparation for MUX support.  Currently, by default, I2CAddress is typedef'd to uint8_t.
MUX support implemented for AVR and Wire versions.
2023-02-04 23:57:22 +00:00
Neil McKechnie
49713badb2 Update I2CManager_NonBlocking.h
Add code to try and recover from stuck bus following a timeout.
2023-02-02 12:21:35 +00:00
Neil McKechnie
ba9b363058 I2CManager_NonBlocking - Defer I2C speed changes for all drivers
Following on from the change to I2CManager_SAMD.h, the capability of deferring a request to change the speed of the I2C has been removed from the SAMD driver and put into the common NonBlocking code, so that all native drivers benefit from it.
2023-01-31 18:39:15 +00:00
Neil McKechnie
e8e00f69d6 Non-blocking I2C - reset byte counters on timeout. 2023-01-23 22:31:33 +00:00
Neil McKechnie
705617239f Sort out I2C timeout handling, and further I2C diagnostics.
Timeout handling and recovery in loop() function now operative.
Start-up check for I2C signals short to ground added.
Initial I2C device probe speed up.
Possible infinite loops in I2C AVR native driver during fault conditions removed.
2023-01-22 13:13:20 +00:00
Neil McKechnie
538519dd9d Add option to suppress I2C retries.
I2CRB method suppressRetries() added to allow retries to be suppressed.
2023-01-14 18:58:06 +00:00
Neil McKechnie
6e69df2da8 Add I2C retries to Wire and to non-blocking I2CManager. 2023-01-14 18:18:57 +00:00
pmantoine
e7d8d320bd SAMD21 I2C native interrupt capable driver 2022-08-06 17:51:13 +08:00
Neil McKechnie
6c98f90151 Reduce I2C interrupt time
Reduce the time spent with interrupts disabled in I2CManager response code by enabling interrupts after the state machine has finished.
Also, some comment changes.
2021-11-15 14:30:27 +00:00
Neil McKechnie
0a9fcf6ebc
Neil bugfixes. (#186)
* Re-enable native I2C driver.

* Minor non-functional changes to native I2C Manager.

* Minor changes to make variable types explicit in comparisons.

* Fix IODevice::loop() to avoid null pointer dereference.

Strange problems with LCD driver tracked down to being caused by a call to p->_loop() when p is NULL.

* Correct sense of comparison in LCN support function Turnout::setClosedStateOnly()

* Remove code (now unused) from LCD driver.

* Add I2C textual error messages.

* Add I2C textual error messages.

* Fix compile error in 4809 I2C driver.

* Remove init function call from SSD1306 driver.
2021-08-26 23:04:13 +01:00
Neil McKechnie
2469629cbb Temporarily use Wire for I2C. 2021-08-25 10:26:45 +01:00
Neil McKechnie
fa04fa5084 I2C Manager, adjust loop code.
loop() contains startTransaction which is called after handleInterrupt().  However, startTransaction is called within handleInterrupt so remove the extra call.  This appears to solve strange problems encountered with the LCD display.
2021-08-25 00:34:19 +01:00
FrightRisk
5eff4c5ee5 Squash all commits on RMFT branch to create EX-RAIL branch 2021-08-03 17:12:25 -04:00