avr: implement g/sw [get/set watchdog time-out events] and g/sb [get/set brown-out events]

This commit is contained in:
Bart Van Der Meerssche 2010-12-27 23:23:15 +01:00
parent 3d1b67f221
commit 1ada193cea
1 changed files with 18 additions and 0 deletions

View File

@ -240,6 +240,14 @@ void ctrlCmdGet(uint8_t cmd)
ctrlReadCharFromRxBuffer(&i);
ctrlWriteShortToTxBuffer(sensor[i].meterconst);
break;
case 'w':
ctrlWriteShortToTxBuffer(event.wdt);
break;
case 'b':
ctrlWriteShortToTxBuffer(event.brown_out);
break;
}
}
@ -253,14 +261,24 @@ void ctrlCmdSet(uint8_t cmd)
ctrlReadCharFromRxBuffer(&phy_to_log[i]);
}
break;
case 'v':
ctrlReadCharFromRxBuffer(&i);
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
break;
case 'm':
ctrlReadCharFromRxBuffer(&i);
ctrlReadShortFromRxBuffer((uint16_t *)&sensor[i].meterconst);
break;
case 'w':
ctrlReadShortFromRxBuffer((uint16_t *)&event.wdt);
break;
case 'b':
ctrlReadShortFromRxBuffer((uint16_t *)&event.brown_out);
break;
}
}