Doxygen stuff.
[goodfet] / firmware / include / platform.h
index b5e1fa8..5de88ca 100644 (file)
@@ -1,4 +1,10 @@
-//! \file platform.h
+/*! \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.
+*/
 
 #include <signal.h>
 #include <io.h>
 
 
 //Use P3 instead of P5 for target I/O on chips without P5.
-#ifdef __msp430x22x4
-#warning "2274, using P3 instead.  Will break 2618 and 1612 support."
+#ifndef __MSP430_HAS_PORT5__
+#ifndef __MSP430_HAS_PORT5_R__
+#warning "No P5, using P3 instead.  Will break 2618 and 1612 support."
 #define P5OUT P3OUT
 #define P5DIR P3DIR
 #define P5REN P3REN
 #define P5IN P3IN
+
+#endif
+#endif
+
+//Use false P5REN for 1612.
+#ifdef __MSP430_HAS_PORT5__
+#ifndef __MSP430_HAS_PORT5_R__
+#warning "1xx, using fake P5REN for external pulling resistors."
+#define P5REN P5OUT
+#endif
 #endif
 
 unsigned char serial_rx();