mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Merge branch 'EX-RAIL' of https://github.com/DCC-EX/CommandStation-EX into EX-RAIL
This commit is contained in:
commit
264908dc24
|
@ -42,7 +42,7 @@
|
||||||
// and PCA9685.
|
// and PCA9685.
|
||||||
void IODevice::begin() {
|
void IODevice::begin() {
|
||||||
// Initialise the IO subsystem
|
// 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
|
// Predefine two PCA9685 modules 0x40-0x41
|
||||||
// Allocates 32 pins 100-131
|
// Allocates 32 pins 100-131
|
||||||
PCA9685::create(100, 16, 0x40);
|
PCA9685::create(100, 16, 0x40);
|
||||||
|
|
|
@ -344,8 +344,8 @@ private:
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// #include "IO_MCP23008.h"
|
#include "IO_MCP23008.h"
|
||||||
// #include "IO_MCP23017.h"
|
#include "IO_MCP23017.h"
|
||||||
// #include "IO_PCF8574.h"
|
#include "IO_PCF8574.h"
|
||||||
|
|
||||||
#endif // iodevice_h
|
#endif // iodevice_h
|
|
@ -129,7 +129,7 @@ void PCA9685::_write(VPIN vpin, int value) {
|
||||||
s->numSteps = profile==Fast ? 10 :
|
s->numSteps = profile==Fast ? 10 :
|
||||||
profile==Medium ? 20 :
|
profile==Medium ? 20 :
|
||||||
profile==Slow ? 40 :
|
profile==Slow ? 40 :
|
||||||
profile==Bounce ? sizeof(_bounceProfile) :
|
profile==Bounce ? sizeof(_bounceProfile)-1 :
|
||||||
1;
|
1;
|
||||||
s->state = value;
|
s->state = value;
|
||||||
s->stepNumber = 0;
|
s->stepNumber = 0;
|
||||||
|
@ -163,7 +163,7 @@ void PCA9685::_writeAnalogue(VPIN vpin, int value, int profile) {
|
||||||
s->numSteps = profile==Fast ? 10 :
|
s->numSteps = profile==Fast ? 10 :
|
||||||
profile==Medium ? 20 :
|
profile==Medium ? 20 :
|
||||||
profile==Slow ? 40 :
|
profile==Slow ? 40 :
|
||||||
profile==Bounce ? sizeof(_bounceProfile) :
|
profile==Bounce ? sizeof(_bounceProfile)-1 :
|
||||||
1;
|
1;
|
||||||
s->stepNumber = 0;
|
s->stepNumber = 0;
|
||||||
s->toPosition = min(value, 4095);
|
s->toPosition = min(value, 4095);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user