mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +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 (strncmp(eeStore->data.id, EESTORE_ID, sizeof(EESTORE_ID)) != 0) {
|
||||||
// if not, create blank eeStore structure (no
|
// if not, create blank eeStore structure (no
|
||||||
// turnouts, no sensors) and save it back to EEPROM
|
// 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.nTurnouts = 0;
|
||||||
eeStore->data.nSensors = 0;
|
eeStore->data.nSensors = 0;
|
||||||
eeStore->data.nOutputs = 0;
|
eeStore->data.nOutputs = 0;
|
||||||
|
@ -92,7 +92,7 @@ int EEStore::pointer() { return (eeAddress); }
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void EEStore::dump(int num) {
|
void EEStore::dump(int num) {
|
||||||
byte b;
|
byte b = 0;
|
||||||
DIAG(F("Addr 0x char"));
|
DIAG(F("Addr 0x char"));
|
||||||
for (int n = 0; n < num; n++) {
|
for (int n = 0; n < num; n++) {
|
||||||
EEPROM.get(n, b);
|
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.
|
* returned in the I2CRB as for the asynchronous version.
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
void I2CManagerClass::queueRequest(I2CRB *req) {
|
void I2CManagerClass::queueRequest(I2CRB *req) {
|
||||||
uint8_t status;
|
|
||||||
switch (req->operation) {
|
switch (req->operation) {
|
||||||
case OPERATION_READ:
|
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;
|
break;
|
||||||
case OPERATION_SEND:
|
case OPERATION_SEND:
|
||||||
status = write(req->i2cAddress, req->writeBuffer, req->writeLen, req);
|
req->status = write(req->i2cAddress, req->writeBuffer, req->writeLen, req);
|
||||||
break;
|
break;
|
||||||
case OPERATION_SEND_P:
|
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;
|
break;
|
||||||
case OPERATION_REQUEST:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
req->status = status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue
Block a user