diff --git a/master/master/master.c b/master/master/master.c --- a/master/master/master.c +++ b/master/master/master.c @@ -22,6 +22,7 @@ void micro_setup() { // Generic microcontroller config options + } int main(void) diff --git a/slave/slave/config.h b/slave/slave/config.h --- a/slave/slave/config.h +++ b/slave/slave/config.h @@ -11,6 +11,6 @@ #define F_CPU 11059200 #define USART_BAUDRATE 19200 - #define MODULE_ID '2' //TEMP + #endif /* CONFIG_H_ */ \ No newline at end of file diff --git a/slave/slave/lib/io.c b/slave/slave/lib/inputOutput.c rename from slave/slave/lib/io.c rename to slave/slave/lib/inputOutput.c --- a/slave/slave/lib/io.c +++ b/slave/slave/lib/inputOutput.c @@ -4,3 +4,15 @@ * Created: 11/7/2012 7:17:52 PM * Author: kripperger */ + + #include + + uint8_t io_getModuleId() { + //get ID from rotary dip and return it. + + uint8_t id; + + id = 0; //DEBUG + + return id; + } \ No newline at end of file diff --git a/slave/slave/lib/io.h b/slave/slave/lib/inputOutput.h rename from slave/slave/lib/io.h rename to slave/slave/lib/inputOutput.h --- a/slave/slave/lib/io.h +++ b/slave/slave/lib/inputOutput.h @@ -6,11 +6,11 @@ */ -#ifndef IO_H_ -#define IO_H_ + #ifndef IO_H_ + #define IO_H_ + + uint8_t io_getModuleId(); //get ID from rotary dip and return it. - - -#endif /* IO_H_ */ \ No newline at end of file + #endif /* IO_H_ */ \ No newline at end of file diff --git a/slave/slave/lib/led.c b/slave/slave/lib/led.c --- a/slave/slave/lib/led.c +++ b/slave/slave/lib/led.c @@ -7,18 +7,18 @@ #include - void led_Configure() { + void led_configure() { // Configure ports/pins for LEDs } - void led_On(uint8_t led) { + void led_on(uint8_t led) { // Turn the specified LED on } - void led_Off(uint8_t led) { + void led_off(uint8_t led) { // Turn the specified LED off } - void led_Toggle(uint8_t led) { + void led_toggle(uint8_t led) { // Toggle the specified LED } \ No newline at end of file diff --git a/slave/slave/lib/led.h b/slave/slave/lib/led.h --- a/slave/slave/lib/led.h +++ b/slave/slave/lib/led.h @@ -14,10 +14,10 @@ #define STAT 3 #define OK 4 - void led_Configure(); - void led_On(uint8_t led); - void led_Off(uint8_t led); - void led_Toggle(uint8_t led); + void led_configure(); + void led_on(uint8_t led); + void led_off(uint8_t led); + void led_toggle(uint8_t led); #endif /* LED_H_ */ diff --git a/slave/slave/slave.c b/slave/slave/slave.c --- a/slave/slave/slave.c +++ b/slave/slave/slave.c @@ -16,22 +16,29 @@ #include #include -#include "lib/serial.h" +//#include "lib/serial.h" #include "lib/led.h" void micro_setup() { // Generic microcontroller config options + } + + int main(void) { // Initialize micro_setup(); - led_setup(); - serial_setup(); // Config serial ports + led_configure(); + //serial_setup(); // Config serial ports + uint8_t moduleID = io_getModuleId(); //Slave Module ID from rotary dip switch + while(1) { //serial_SendCommand('0','A',0,0); } + + return 0; } \ No newline at end of file diff --git a/slave/slave/slave.cproj b/slave/slave/slave.cproj --- a/slave/slave/slave.cproj +++ b/slave/slave/slave.cproj @@ -83,21 +83,9 @@ compile - - compile - - - compile - compile - - compile - - - compile - compile