]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430Usci.h
The msp430 now has two basic clock peripherals. Add tos/chips/msp430/clock and
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430Usci.h
index 482998225e41bd04aa05050bae544ddc69f00165..50a0ca72e5bb6f37f4d8eff30dd1876dee2b365f 100644 (file)
@@ -69,17 +69,6 @@ typedef enum {
   USCI_REN_TX_PULLDOWN = USCI_REN_TX + 0x20
 } msp430_ren_t;
 
-typedef struct {
-  uint8_t ctl0;
-  uint8_t ctl1;
-  uint16_t brx;
-  uint8_t mctl;
-  uint8_t irtctl;
-  uint8_t irrctl;
-  uint8_t abctl;
-  msp430_ren_t ren;
-} __attribute__ ((packed)) msp430_usci_uart_t;
-
 /* Baud rates for UART mode.  Only 32KHz modes work right now. */
 typedef enum {
   /* UCOS16=0.  UMCTL = UCBRFx << 4 + UCBRSx << 1 + UCOS16.
@@ -87,13 +76,40 @@ typedef enum {
    */
   UBRX_32768HZ_9600=3, UMCTL_32768HZ_9600=(0 << 4) + (3 << 1) + 0,
   UBRX_1MHZ_9600=109, UMCTL_1MHZ_9600=(0 << 4) + (2 << 1) + 0,
+  UBRX_1MHZ_19200=54, UMCTL_1MHZ_19200=(0 << 4) + (5 << 1) + 0,
+  UBRX_1MHZ_38400=27, UMCTL_1MHZ_38400=(0 << 4) + (2 << 1) + 0,
   UBRX_1MHZ_115200=9, UMCTL_1MHZ_115200=(0 << 4) + (1 << 1) + 0,
   UBRX_1E6MHZ_9600=104, UMCTL_1E6MHZ_9600=(0 << 4) + (1 << 1) + 0,
   UBRX_1E6MHZ_115200=8, UMCTL_1E6MHZ_115200=(0 << 4) + (6 << 1) + 0,
 } msp430_usci_uart_rate_t;
 
-typedef union {
-  msp430_usci_uart_t uart;
-} __attribute__ ((packed)) msp430_usci_config_t;
+typedef struct {
+  uint8_t ctl0;
+  uint8_t ctl1;
+  uint16_t brx;
+  uint8_t mctl;
+  uint8_t irtctl;
+  uint8_t irrctl;
+  uint8_t abctl;
+  msp430_ren_t ren;
+} __attribute__ ((packed)) msp430_usci_uart_t;
+
+typedef struct {
+  uint8_t ctl0;
+  uint8_t ctl1;
+  uint16_t brx;
+  uint8_t mctl; /* ??? */
+  msp430_ren_t ren;
+} __attribute__ ((packed)) msp430_usci_spi_t;
+
+typedef struct {
+  uint8_t ctl0;
+  uint8_t ctl1;
+  uint16_t brx;
+  uint8_t i2cie;
+  uint8_t i2coa;
+  uint8_t i2csa;
+  msp430_ren_t ren;
+} __attribute__ ((packed)) msp430_usci_i2c_t;
 
 #endif