Project

General

Profile

Revision 201

Added by Kevin Woo about 14 years ago

  • Setup bootloader to initialize pins to a known safe state
  • Pulled pindefs for the toolbox out of the toolbox into common/toolbox_pindefs.h
  • Shared toolbox pindefs with the bootloader
  • Replaced all raw pin names with the #defined names
  • Optimizied out some bytes out of the bootloader by sharing variables

View differences:

main.c
30 30
#include <util/delay.h>
31 31
#include <tooltron.h>
32 32
#include "jumptable.h"
33
#include <toolbox_pindefs.h>
33 34
#define TOOLBOX
34 35
#define RELAY       _BV(PORTD4)
35 36
#define VAC_SENSE   _BV(PIND3)
......
45 46
#define ADDR 18
46 47
#define DELIM '^'
47 48
#define SERVER 1
48
#define TURNON 'O'
49
#define TURNON 'O' 'O''0'
49 50

  
50 51
/***
51 52
 * TWAIT - minutes to wait before green button is pressed to kill power
......
205 206

  
206 207
                if (r == (packet[0] ^ packet[1] ^ packet[2])) {
207 208

  
208
                    if (packet[2] == TURNON) {
209
                    if (packet[2] == TT_TON) {
209 210
                        state = ack;
210 211
                        break;
211 212
                    }

Also available in: Unified diff