X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Finclude%2Fplatform.h;h=44767241b9b793ef44a371146a98f015b85e7e62;hp=a9f9ebc8efebe40b13499cb1bfd5769ebd7e35bf;hb=78533a51ab5421601b046a917dd0f6f01a402a49;hpb=5fb0341d348e101b30794945a6c91546e25e8e7b diff --git a/firmware/include/platform.h b/firmware/include/platform.h index a9f9ebc..4476724 100644 --- a/firmware/include/platform.h +++ b/firmware/include/platform.h @@ -1,29 +1,51 @@ /*! \file platform.h \author Travis Goodspeed \brief Port and baud rate definitions. - + The functions specified here are defined in the platform definition file, such as msp430x1612.c or msp430x2618.c. */ +#ifndef __PLATFORM_H +#define __PLATFORM_H + #include "gfports.h" -#include -#include -#include #include +#ifdef MSP430 + #ifdef __MSPGCC__ + #include + #else + #include + #include + #include + #endif + + void msp430_init(); + void led_init(); //deprecated + void led_on(); + void led_off(); + void led_toggle(); + #if defined telosb || defined apimote + void led2_on(); + void led2_off(); + void led3_on(); + void led3_off(); + #endif +#endif + #include "config.h" -#ifdef telosb -//TelosB uses second serial port. +#ifdef useuart1 +//TelosB and the ApiMote use the second serial port. #define serial_tx serial1_tx #define serial_rx serial1_rx #define setbaud setbaud1 #define msp430_init_uart msp430_init_uart1 #else -//Other targets use first. +//Other targets use first uart. #define serial_tx serial0_tx #define serial_rx serial0_rx #define setbaud setbaud0 @@ -49,3 +71,6 @@ void msp430_init_dco(); //! Called by monitor() when the DCO is correct and communication established. void msp430_init_dco_done(); + +#endif +