avr: implement sp [set phy-to-logical] command

This commit is contained in:
Bart Van Der Meerssche 2010-12-26 19:54:15 +01:00
parent 2e6336b0f8
commit 90645f81c2
1 changed files with 11 additions and 1 deletions

View File

@ -155,7 +155,17 @@ void ctrlCmdGet(uint8_t cmd)
void ctrlCmdSet(uint8_t cmd)
{
/* TODO */
uint8_t i, high_hex, low_hex;
switch (cmd) {
case 'p':
for (i = 0 ; i < MAX_SENSORS; i++) {
ctrlGetFromRxBuffer(&high_hex);
ctrlGetFromRxBuffer(&low_hex);
phy_to_log[i] = htob(((uint16_t)high_hex << 8) + low_hex);
}
break;
}
}
void ctrlCmdCommit(void)