mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
Update IO_AnalogueInputs.h
Add I2C initialisation calls (previously missing).
This commit is contained in:
parent
e079a9e395
commit
bfbc45674f
|
@ -73,6 +73,11 @@ private:
|
|||
addDevice(this);
|
||||
}
|
||||
void _begin() {
|
||||
// Initialise I2C
|
||||
I2CManager.begin();
|
||||
// ADS111x support high-speed I2C (4.3MHz) but that requires special
|
||||
// processing. So stick to fast mode (400kHz maximum).
|
||||
I2CManager.setClock(400000);
|
||||
// Initialise ADS device
|
||||
if (I2CManager.exists(_i2cAddress)) {
|
||||
_nextState = STATE_STARTSCAN;
|
||||
|
|
Loading…
Reference in New Issue
Block a user