1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 16:16:13 +01:00
Commit Graph

1624 Commits

Author SHA1 Message Date
Neil McKechnie
f1f1be8ad9 Oops- forgot to push this one. Name changes again. 2023-02-12 09:18:02 +00:00
Neil McKechnie
ec73ac69d9 A few more name changes to more generic names 2023-02-12 09:01:16 +00:00
Neil McKechnie
35f3cca9b3 Rename LCDDisplay class to Display; renameEXRAIL LCD2 macro to SCREEN 2023-02-11 23:37:09 +00:00
Neil McKechnie
65f7a4917f Separate out lcd (write to default display) and lcd2 (any display). 2023-02-11 17:04:18 +00:00
Neil McKechnie
8be9d9e0b0 Support for multiple displays (OLED etc).
New EXRAIL command LCD2(display,row,"text").  Display 0 is the usual one, other displays can be configured through HAL.
2023-02-11 15:47:50 +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
e498915b28 Update I2CManager_AVR.h
Avoid loop in I2C_sendStart function.
2023-02-10 19:57:42 +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
1cfe5a1e46 Update I2CManager_STM32.h
Fix some merge errors.
2023-02-10 18:22:35 +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
98697427a3 Update I2CManager_SAMD.h
Fix compile errors following other changes
2023-02-10 18:21:06 +00:00
Neil McKechnie
f5b5809ba5 Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck 2023-02-10 15:57:57 +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
553a94bf67 I2CManager: Refactor common driver code.
Put mux handling into I2CManager_NonBlocking.h to keep the native (controller-specific) drivers more simple.
Remove almost all but one of the static definitions, in preparation for supporting multiple I2C buses.
2023-02-10 15:46:50 +00:00
Neil McKechnie
18b148ed1f IO_EXFastClock - fix compile error due to closing brace outside of #if block. 2023-02-10 15:35:17 +00:00
Neil McKechnie
1ffb3a9836 Update IO_OLEDDisplay.h
Round up number of characters per line, so that the last few pixels on the line are erased when writing blanks.
2023-02-10 15:34:13 +00:00
Neil McKechnie
f358880f30 IO_VL53L0X: Some bug fixes.
Modify state model, and improve recovery after <D HAL RESET>.
2023-02-10 15:32:41 +00:00
Neil McKechnie
5f9705d1b7 Improve IODevice::reset function
Ensure that the _loop() function is able to run after a device is reset.
2023-02-10 15:30:35 +00:00
Neil McKechnie
7e2487ffbb Avoid compiler error when no HAL installed. 2023-02-10 15:29:09 +00:00
pmantoine
fd07402aec STM32 better I2C still work in progress 2023-02-09 15:12:16 +08:00
Neil McKechnie
8083bd1b3b Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck 2023-02-09 00:18:17 +00:00
Neil McKechnie
9e0e110b5d Update defines.h - inappropriate define NO_INTERRUPTS replaced with I2C_USE_WIRE. 2023-02-09 00:17:31 +00:00
Neil McKechnie
7de46a0c17 Add <D HAL RESET> command to attempt to reset failed devices. 2023-02-09 00:16:39 +00:00
Neil McKechnie
9dd9990979 Improve formatting of I2CAddress data type in diagnostics. 2023-02-09 00:16:06 +00:00
Neil McKechnie
dd0ee8b50a Additional support for Extended I2C Addresses 2023-02-09 00:13:23 +00:00
pmantoine
d7f92d7b88 STM32 native I2C driver updates 2023-02-08 13:06:11 +08:00
pmantoine
3fbcd6f300 STM32 native I2C driver initial edits 2023-02-08 10:04:18 +08:00
Neil McKechnie
a0f0b860eb Update version.h 2023-02-07 23:21:23 +00:00
Neil McKechnie
efb2666060 DCCTimer_AVR - incorporate Haba's optimisations to ADC scanning 2023-02-07 23:18:59 +00:00
Neil McKechnie
73a7d3e0ca Update I2CManager_AVR.h
Bug fix in native driver MUX code.
2023-02-07 23:16:37 +00:00
Neil McKechnie
47cb43d1e9 Update IO_OLEDDisplay.h
Make display updates non-blocking (after initialisation completes).
2023-02-07 23:16:00 +00:00
Neil McKechnie
e2e9b7bae7 Update version.h 2023-02-07 22:04:09 +00:00
Neil McKechnie
31ce2e3fef EXTurntable - change I2C address type to I2CAddress. 2023-02-07 18:36:48 +00:00
Neil McKechnie
d8881deb6a Merge branch 'devel' into devel-nmck 2023-02-07 18:05:18 +00:00
Neil McKechnie
5439dd3158 Suppress compiler warnings. 2023-02-07 17:59:40 +00:00
Neil McKechnie
aad0d28d1f Servo driver - split PCA9685 into a filter + PWM driver.
Two new drivers: PCA9685pwm drives the PCA9685 I2C device directly, and Servo driver which acts as a 'shim' over the top to control animations.  This is aimed at supporting devices like the EXIOExpander by allowing the Servo driver to talk to the EXIOExpander driver instead, to animate servos on another controller.
2023-02-07 17:24:05 +00:00
Neil McKechnie
19070d33ba Add Arduino M0, and display time on serial monitor. 2023-02-07 17:13:36 +00:00
Neil McKechnie
7b79680de2 First stab at HAL-installable OLED Display Driver. 2023-02-07 17:09:17 +00:00
Neil McKechnie
0c88c74706 Revert "Refactor SSD1306 initialisation to support different initialisation sequences."
This reverts commit 278a9c52a6.
2023-02-07 17:01:45 +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
261ccf2f3b HAL - change variable type for PCA9685 data. 2023-02-07 15:09:21 +00:00
Neil McKechnie
278a9c52a6 Refactor SSD1306 initialisation to support different initialisation sequences.
To support a HAL Display driver, the SSD1306 driver can be created (new) and then the I2C address assigned explicitly in the begin() call.  The original approach of looking for the I2C device address has also been retained in a different constructor.
2023-02-07 15:07:29 +00:00
Neil McKechnie
9435869ee3 Prepare HAL device drivers to support Extended I2C Addresses
Cast I2CAddress variables in DIAG calls to (int).
2023-02-07 15:04:03 +00:00
Neil McKechnie
d5a394d4e6 Prepare HAL device drivers to support Extended I2C Addresses
Update I2C addresses of HAL devices to type I2CAddress (to support extended address functions).
Cast I2CAddress variables in DIAG calls to (int).
Remove uses of max() function (not available on some platforms.
2023-02-07 14:55:14 +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
45657881eb Merge branch 'devel-nmck' of https://github.com/DCC-EX/CommandStation-EX into devel-nmck 2023-02-04 23:01:51 +00:00
Neil McKechnie
a590245e93 I2CManager_SAMD.h: Remove unneeded declaration. 2023-02-04 21:01:02 +00:00
Neil McKechnie
6f5680fce0 DFPlayer: Avoid jumps in volume when switching song and reducing volume at the same time. 2023-02-04 20:59:19 +00:00
Neil McKechnie
2f46a8e083 Add EX-RAIL 'ANOUT' function for general analogue outputs. 2023-02-04 20:56:12 +00:00
Neil McKechnie
bd62939713 Fix handling of hex numbers to avoid extending MSB (sign bit)
Also, added format %X (unsigned long) to complement %x (unsigned int).
2023-02-04 20:55:14 +00:00