Revision 207 trunk/toolbox/main.c
| main.c (revision 207) | ||
|---|---|---|
| 32 | 32 |
#include <tooltron.h> |
| 33 | 33 |
#include <toolbox_pindefs.h> |
| 34 | 34 |
#include "jumptable.h" |
| 35 |
#include "reset.h" |
|
| 36 | 35 |
|
| 37 | 36 |
/*** |
| 38 | 37 |
* TWAIT - minutes to wait before green button is pressed to kill power |
| ... | ... | |
| 46 | 45 |
uint8_t sec; |
| 47 | 46 |
uint8_t min; |
| 48 | 47 |
|
| 49 |
typedef struct {
|
|
| 50 |
uint8 |
|
| 51 |
|
|
| 52 | 48 |
typedef enum {
|
| 53 | 49 |
wait, // wait for a turn on packet |
| 54 | 50 |
pwron, // poweron |
| ... | ... | |
| 198 | 194 |
toggle_led(LED_YELLOW, ON); |
| 199 | 195 |
state = pwron; |
| 200 | 196 |
reset_timer(); |
| 201 |
// Reset the board |
|
| 202 |
} else if (resp == TT_RESET) {
|
|
| 203 |
send_packet(TT_ACK, addr); |
|
| 204 |
reset(); |
|
| 205 | 197 |
} |
| 206 | 198 |
break; |
| 207 | 199 |
case pwron: |
Also available in: Unified diff