avr: implement g/sw [get/set watchdog time-out events] and g/sb [get/set brown-out events]
This commit is contained in:
parent
3d1b67f221
commit
1ada193cea
|
@ -240,6 +240,14 @@ void ctrlCmdGet(uint8_t cmd)
|
||||||
ctrlReadCharFromRxBuffer(&i);
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
ctrlWriteShortToTxBuffer(sensor[i].meterconst);
|
ctrlWriteShortToTxBuffer(sensor[i].meterconst);
|
||||||
break;
|
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]);
|
ctrlReadCharFromRxBuffer(&phy_to_log[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
ctrlReadCharFromRxBuffer(&i);
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
|
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
ctrlReadCharFromRxBuffer(&i);
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
ctrlReadShortFromRxBuffer((uint16_t *)&sensor[i].meterconst);
|
ctrlReadShortFromRxBuffer((uint16_t *)&sensor[i].meterconst);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'w':
|
||||||
|
ctrlReadShortFromRxBuffer((uint16_t *)&event.wdt);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'b':
|
||||||
|
ctrlReadShortFromRxBuffer((uint16_t *)&event.brown_out);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue