]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
UartControl update for enum consistency and support in atm128/msp430.
authorscipio <scipio>
Mon, 14 Sep 2009 00:25:59 +0000 (00:25 +0000)
committerscipio <scipio>
Mon, 14 Sep 2009 00:25:59 +0000 (00:25 +0000)
tos/chips/atm128/Atm128Uart.h
tos/chips/msp430/usart/msp430usart.h
tos/interfaces/UartControl.nc

index 63d49cdebd48ea50a37d6bcf25f4b12a20cb529d..084001805b60ecf6160dca98c573cebad3f93346 100644 (file)
@@ -127,6 +127,28 @@ typedef uint8_t Atm128_UBRR0H_t;  //!< UART 0 Baud Register (High)
 typedef uint8_t Atm128_UBRR1L_t;  //!< UART 1 Baud Register (Low)
 typedef uint8_t Atm128_UBRR1H_t;  //!< UART 1 Baud Register (High)
 
+typedef uint8_t uart_parity_t;
+typedef uint8_t uart_speed_t;
+typedef uint8_t uart_duplex_t;
+
+enum {
+  TOS_UART_PARITY_NONE = 0,
+  TOS_UART_PARITY_EVEN = 1,
+  TOS_UART_PARITY_ODD  = 2,
+};
+
+enum {
+  TOS_UART_19200  = 0,
+  TOS_UART_38400  = 1,
+  TOS_UART_57600  = 2,
+};
+
+enum {
+  TOS_UART_OFF    = 0,
+  TOS_UART_RONLY  = 1,
+  TOS_UART_TONLY  = 2,
+  TOS_UART_DUPLEX = 3,
+};
 
 #endif //_H_Atm128UART_h
 
index 5a50349cd6c45b3350df9c57b044e40e5350e72c..08d543b3d93338378086d0fbad5cf958a8051bb8 100644 (file)
@@ -306,5 +306,35 @@ msp430_i2c_union_config_t msp430_i2c_default_config = {
   } 
 };
 
+typedef uint8_t uart_speed_t;
+typedef uint8_t uart_parity_t;
+typedef uint8_t uart_duplex_t;
+
+enum {
+  TOS_UART_1200   = 0,
+  TOS_UART_1800   = 1,
+  TOS_UART_2400   = 2,
+  TOS_UART_4800   = 3,
+  TOS_UART_9600   = 4,
+  TOS_UART_19200  = 5,
+  TOS_UART_38400  = 6,
+  TOS_UART_57600  = 7,
+  TOS_UART_76800  = 8,
+  TOS_UART_115200 = 9,
+  TOS_UART_230400 = 10
+};
+
+enum {
+  TOS_UART_OFF,
+  TOS_UART_RONLY,
+  TOS_UART_TONLY,
+  TOS_UART_DUPLEX
+};
+
+enum {
+  TOS_UART_PARITY_NONE,
+  TOS_UART_PARITY_EVEN,
+  TOS_UART_PARITY_ODD
+};
 
 #endif//_H_Msp430Usart_h
index 76c52874ae6fc98ad9b751402e92c59a34a4dede..f0226b4f284960a58174dfb643b1986df8bfce8e 100644 (file)
@@ -86,7 +86,8 @@ interface UartControl {
     * only be called when both the receive and transmit paths
     * are disabled, either through a power control interface
     * or setDuplexMode. Valid parity settings are
-    * TOS_PARITY_NONE, TOS_PARITY_EVEN, and TOS_PARITY_ODD.
+    * TOS_UART_PARITY_NONE, TOS_UART_PARITY_EVEN, 
+    * and TOS_UART_PARITY_ODD.
     *
     *  @param parity The parity mode to change to.
     */