mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
fix compiler Werror
This commit is contained in:
parent
c711be7980
commit
feebe67ecb
|
@ -43,7 +43,7 @@ void EEStore::init() {
|
|||
if (strncmp(eeStore->data.id, EESTORE_ID, sizeof(EESTORE_ID)) != 0) {
|
||||
// if not, create blank eeStore structure (no
|
||||
// turnouts, no sensors) and save it back to EEPROM
|
||||
strncpy(eeStore->data.id, EESTORE_ID, sizeof(EESTORE_ID));
|
||||
strncpy(eeStore->data.id, EESTORE_ID, sizeof(EESTORE_ID)+0);
|
||||
eeStore->data.nTurnouts = 0;
|
||||
eeStore->data.nSensors = 0;
|
||||
eeStore->data.nOutputs = 0;
|
||||
|
@ -92,7 +92,7 @@ int EEStore::pointer() { return (eeAddress); }
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EEStore::dump(int num) {
|
||||
byte b;
|
||||
byte b = 0;
|
||||
DIAG(F("Addr 0x char"));
|
||||
for (int n = 0; n < num; n++) {
|
||||
EEPROM.get(n, b);
|
||||
|
|
|
@ -98,22 +98,20 @@ uint8_t I2CManagerClass::read(uint8_t address, uint8_t readBuffer[], uint8_t rea
|
|||
* returned in the I2CRB as for the asynchronous version.
|
||||
***************************************************************************/
|
||||
void I2CManagerClass::queueRequest(I2CRB *req) {
|
||||
uint8_t status;
|
||||
switch (req->operation) {
|
||||
case OPERATION_READ:
|
||||
status = read(req->i2cAddress, req->readBuffer, req->readLen, NULL, 0, req);
|
||||
req->status = read(req->i2cAddress, req->readBuffer, req->readLen, NULL, 0, req);
|
||||
break;
|
||||
case OPERATION_SEND:
|
||||
status = write(req->i2cAddress, req->writeBuffer, req->writeLen, req);
|
||||
req->status = write(req->i2cAddress, req->writeBuffer, req->writeLen, req);
|
||||
break;
|
||||
case OPERATION_SEND_P:
|
||||
status = write_P(req->i2cAddress, req->writeBuffer, req->writeLen, req);
|
||||
req->status = write_P(req->i2cAddress, req->writeBuffer, req->writeLen, req);
|
||||
break;
|
||||
case OPERATION_REQUEST:
|
||||
status = read(req->i2cAddress, req->readBuffer, req->readLen, req->writeBuffer, req->writeLen, req);
|
||||
req->status = read(req->i2cAddress, req->readBuffer, req->readLen, req->writeBuffer, req->writeLen, req);
|
||||
break;
|
||||
}
|
||||
req->status = status;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -125,4 +123,4 @@ void I2CManagerClass::loop() {}
|
|||
void I2CManagerClass::checkForTimeout() {}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user