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

Merge branch 'EX-RAIL' of https://github.com/DCC-EX/CommandStation-EX into EX-RAIL

This commit is contained in:
Asbelos 2021-08-14 16:43:05 +01:00
commit 264908dc24
3 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@
// and PCA9685.
void IODevice::begin() {
// Initialise the IO subsystem
ArduinoPins::create(2, NUM_DIGITAL_PINS-3); // Reserve pins for direct access
ArduinoPins::create(2, NUM_DIGITAL_PINS-2); // Reserve pins for direct access
// Predefine two PCA9685 modules 0x40-0x41
// Allocates 32 pins 100-131
PCA9685::create(100, 16, 0x40);

View File

@ -344,8 +344,8 @@ private:
/////////////////////////////////////////////////////////////////////////////////////////////////////
// #include "IO_MCP23008.h"
// #include "IO_MCP23017.h"
// #include "IO_PCF8574.h"
#include "IO_MCP23008.h"
#include "IO_MCP23017.h"
#include "IO_PCF8574.h"
#endif // iodevice_h

View File

@ -129,7 +129,7 @@ void PCA9685::_write(VPIN vpin, int value) {
s->numSteps = profile==Fast ? 10 :
profile==Medium ? 20 :
profile==Slow ? 40 :
profile==Bounce ? sizeof(_bounceProfile) :
profile==Bounce ? sizeof(_bounceProfile)-1 :
1;
s->state = value;
s->stepNumber = 0;
@ -163,7 +163,7 @@ void PCA9685::_writeAnalogue(VPIN vpin, int value, int profile) {
s->numSteps = profile==Fast ? 10 :
profile==Medium ? 20 :
profile==Slow ? 40 :
profile==Bounce ? sizeof(_bounceProfile) :
profile==Bounce ? sizeof(_bounceProfile)-1 :
1;
s->stepNumber = 0;
s->toPosition = min(value, 4095);