diff --git a/master/master/config.h b/master/master/config.h --- a/master/master/config.h +++ b/master/master/config.h @@ -13,6 +13,14 @@ #define MODULE_ID '1' // -------------------------------------------------------------------------- +// Error Codes config (led.c) +// -------------------------------------------------------------------------- + +// SD Card +#define ERROR_SD_INIT 2 +#define ERROR_SD_PARTITION 3 + +// -------------------------------------------------------------------------- // Slave Sensors config (slavesensors.c) // -------------------------------------------------------------------------- diff --git a/master/master/lib/led.c b/master/master/lib/led.c --- a/master/master/lib/led.c +++ b/master/master/lib/led.c @@ -4,25 +4,46 @@ * Created: 10/25/2012 3:34:03 PM * Author: ethanzonca */ - +#include "../config.h" #include +#include +#include "led.h" -void led_setup() { +void led_setup() +{ // Configure ports/pins for LEDs DDRA = 0xff; //PORTA = 0x00; } -void led_on(uint8_t led) { +void led_on(uint8_t led) +{ // Turn the specified LED on PORTA |= (1<