Check MCUCSR for WDRF flag only and add TODO
This commit is contained in:
@@ -74,8 +74,8 @@ bool WDT_HasTriggered(void)
|
||||
// 7 6 5 4 3 2 1 0
|
||||
// JTD ISC2 – JTRF WDRF BORF EXTRF PORF
|
||||
|
||||
// Is power-on reset flag not set?
|
||||
isreset = ((MCUCSR & BIT(0)) == 0);
|
||||
// Is watchdog reset flag set?
|
||||
isreset = ((MCUCSR & BIT(3)) == 1);
|
||||
|
||||
// XXX: Reset flag detection should be a separate
|
||||
// module to handle the different types.
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
// TODO: Make sure wear leveling resets memory correctly.
|
||||
// TODO: Implement primary state machine for update loop.
|
||||
// TODO: Migrate to ATMega 1284P-PU for 2nd 16-bit timer.
|
||||
// TODO: Keep persistent TEMP and DEWP targets in EEPROM.
|
||||
// TODO: Check thermistor conversion results /w thermometer.
|
||||
// TODO: Implement optional CRC8 sensor measurement check.
|
||||
// TODO: Use 18.432MHz quarz crystal, burn required fuses.
|
||||
// TODO: Make sure nothing breaks with negative temperatures.
|
||||
// TODO: Write an improved command parser (low priority).
|
||||
// TODO: Proper error handling and recovery (after testing).
|
||||
// TODO: Check why the MCUCSR EXTRF reset flag is set.
|
||||
|
||||
enum state_e
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user