1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00
This commit is contained in:
Harald Barth 2023-04-08 23:35:48 +02:00
commit 49c0a1a55a
5 changed files with 11 additions and 2 deletions

View File

@ -162,7 +162,7 @@ uint16_t ADCee::usedpins = 0;
int * ADCee::analogvals = NULL;
int ADCee::init(uint8_t pin) {
uint id = pin - A0;
uint8_t id = pin - A0;
int value = 0;
if (id > NUM_ADC_INPUTS)
@ -210,7 +210,7 @@ int ADCee::read(uint8_t pin, bool fromISR) {
#pragma GCC push_options
#pragma GCC optimize ("-O3")
void ADCee::scan() {
static uint id = 0; // id and mask are the same thing but it is faster to
static uint8_t id = 0; // id and mask are the same thing but it is faster to
static uint16_t mask = 1; // increment and shift instead to calculate mask from id
static bool waiting = false;

View File

@ -237,6 +237,7 @@ int16_t ADCee::ADCmax() {
}
int ADCee::init(uint8_t pin) {
int value = 0;
PinName stmpin = analogInputToPinName(pin);
uint32_t stmgpio = stmpin / 16; // 16-bits per GPIO port group on STM32

View File

@ -134,6 +134,7 @@
#undef STOP
#undef THROW
#undef TURNOUT
#undef TURNOUTL
#undef UNJOIN
#undef UNLATCH
#undef VIRTUAL_SIGNAL
@ -254,6 +255,7 @@
#define STOP
#define THROW(id)
#define TURNOUT(id,addr,subaddr,description...)
#define TURNOUTL(id,addr,description...)
#define UNJOIN
#define UNLATCH(sensor_id)
#define VIRTUAL_SIGNAL(id)

View File

@ -361,6 +361,7 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = {
#define STOP OPCODE_SPEED,V(0),
#define THROW(id) OPCODE_THROW,V(id),
#define TURNOUT(id,addr,subaddr,description...) OPCODE_TURNOUT,V(id),OPCODE_PAD,V(addr),OPCODE_PAD,V(subaddr),
#define TURNOUTL(id,addr,description...) TURNOUT(id,(addr-1)/4+1,(addr-1)%4, description)
#define UNJOIN OPCODE_UNJOIN,0,0,
#define UNLATCH(sensor_id) OPCODE_UNLATCH,V(sensor_id),
#define VIRTUAL_SIGNAL(id)

View File

@ -5,6 +5,7 @@
#define VERSION "4.2.41"
// 4.2.42 - Added EXRAIL TURNOUTL Macro definition
// 4.2.41 - Move HAl startup to ASAP in setup()
// - Fix DNOU8 output pin setup to all LOW
// 4.2.40 - Automatically detect conflicting default I2C devices and disable
@ -72,6 +73,10 @@
// 4.2.11 Exrail IFLOCO feature added
// 4.2.10 SIGNAL/SIGNALH bug fix as they were inverted
// IO_EXIOExpander.h input speed optimisation
// ONCLOCK and ONCLOCKTIME command added to EXRAIL for EX-FastCLock
// <JC> Serial command added for EX-FastClock
// <jC> Broadcast added for EX-FastClock
// IO_EXFastClock.h added for I2C FastClock connection
// 4.2.9 duinoNodes support
// 4.2.8 HIGHMEM (EXRAIL support beyond 64kb)
// Withrottle connect/disconnect improvements