81 #ifndef BSP430_PERIPH_USCI5_H
82 #define BSP430_PERIPH_USCI5_H
94 #define BSP430_MODULE_USCI5 (defined(__MSP430_HAS_USCI_A0__) \
95 || defined(__MSP430_HAS_USCI_B0__))
97 #if defined(BSP430_DOXYGEN) || (BSP430_MODULE_USCI5 - 0)
103 #ifndef BSP430_USCI5_UART_MAX_BAUD
104 #define BSP430_USCI5_UART_MAX_BAUD 1000000UL
116 unsigned int _unused_0x02;
117 unsigned int _unused_0x04;
128 unsigned char _reserved_0x09;
130 unsigned int _reserved_0x08;
133 unsigned char _reserved_0x0B;
135 unsigned char _reserved_0x0D;
137 unsigned char _reserved_0x0F;
141 unsigned char _reserved_0x11;
153 unsigned int _unused_0x14;
154 unsigned int _unused_0x16;
155 unsigned int _unused_0x18;
156 unsigned int _unused_0x1a;
168 #define BSP430_PERIPH_USCI5_A0_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_A0__
169 #define BSP430_PERIPH_USCI5_A1_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_A1__
170 #define BSP430_PERIPH_USCI5_A2_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_A2__
171 #define BSP430_PERIPH_USCI5_A3_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_A3__
172 #define BSP430_PERIPH_USCI5_B0_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_B0__
173 #define BSP430_PERIPH_USCI5_B1_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_B1__
174 #define BSP430_PERIPH_USCI5_B2_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_B2__
175 #define BSP430_PERIPH_USCI5_B3_BASEADDRESS_ __MSP430_BASEADDRESS_USCI_B3__
196 #ifndef configBSP430_HAL_USCI5_A0
197 #define configBSP430_HAL_USCI5_A0 0
201 #if (configBSP430_HAL_USCI5_A0 - 0)
213 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_A0 - 0)
214 #define BSP430_HAL_USCI5_A0 (&xBSP430hal_USCI5_A0_)
233 #ifndef configBSP430_HAL_USCI5_A1
234 #define configBSP430_HAL_USCI5_A1 0
238 #if (configBSP430_HAL_USCI5_A1 - 0)
250 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_A1 - 0)
251 #define BSP430_HAL_USCI5_A1 (&xBSP430hal_USCI5_A1_)
270 #ifndef configBSP430_HAL_USCI5_A2
271 #define configBSP430_HAL_USCI5_A2 0
275 #if (configBSP430_HAL_USCI5_A2 - 0)
287 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_A2 - 0)
288 #define BSP430_HAL_USCI5_A2 (&xBSP430hal_USCI5_A2_)
307 #ifndef configBSP430_HAL_USCI5_A3
308 #define configBSP430_HAL_USCI5_A3 0
312 #if (configBSP430_HAL_USCI5_A3 - 0)
324 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_A3 - 0)
325 #define BSP430_HAL_USCI5_A3 (&xBSP430hal_USCI5_A3_)
344 #ifndef configBSP430_HAL_USCI5_B0
345 #define configBSP430_HAL_USCI5_B0 0
349 #if (configBSP430_HAL_USCI5_B0 - 0)
361 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_B0 - 0)
362 #define BSP430_HAL_USCI5_B0 (&xBSP430hal_USCI5_B0_)
381 #ifndef configBSP430_HAL_USCI5_B1
382 #define configBSP430_HAL_USCI5_B1 0
386 #if (configBSP430_HAL_USCI5_B1 - 0)
398 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_B1 - 0)
399 #define BSP430_HAL_USCI5_B1 (&xBSP430hal_USCI5_B1_)
418 #ifndef configBSP430_HAL_USCI5_B2
419 #define configBSP430_HAL_USCI5_B2 0
423 #if (configBSP430_HAL_USCI5_B2 - 0)
435 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_B2 - 0)
436 #define BSP430_HAL_USCI5_B2 (&xBSP430hal_USCI5_B2_)
455 #ifndef configBSP430_HAL_USCI5_B3
456 #define configBSP430_HAL_USCI5_B3 0
460 #if (configBSP430_HAL_USCI5_B3 - 0)
472 #if defined(BSP430_DOXYGEN) || (configBSP430_HAL_USCI5_B3 - 0)
473 #define BSP430_HAL_USCI5_B3 (&xBSP430hal_USCI5_B3_)
498 #ifndef configBSP430_HPL_USCI5_A0
499 #define configBSP430_HPL_USCI5_A0 (configBSP430_HAL_USCI5_A0 - 0)
502 #if (configBSP430_HAL_USCI5_A0 - 0) && ! (configBSP430_HPL_USCI5_A0 - 0)
503 #warning configBSP430_HAL_USCI5_A0 requested without configBSP430_HPL_USCI5_A0
512 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A0 - 0)
513 #define BSP430_PERIPH_USCI5_A0 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_A0_BASEADDRESS_))
531 #ifndef configBSP430_HPL_USCI5_A1
532 #define configBSP430_HPL_USCI5_A1 (configBSP430_HAL_USCI5_A1 - 0)
535 #if (configBSP430_HAL_USCI5_A1 - 0) && ! (configBSP430_HPL_USCI5_A1 - 0)
536 #warning configBSP430_HAL_USCI5_A1 requested without configBSP430_HPL_USCI5_A1
545 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A1 - 0)
546 #define BSP430_PERIPH_USCI5_A1 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_A1_BASEADDRESS_))
564 #ifndef configBSP430_HPL_USCI5_A2
565 #define configBSP430_HPL_USCI5_A2 (configBSP430_HAL_USCI5_A2 - 0)
568 #if (configBSP430_HAL_USCI5_A2 - 0) && ! (configBSP430_HPL_USCI5_A2 - 0)
569 #warning configBSP430_HAL_USCI5_A2 requested without configBSP430_HPL_USCI5_A2
578 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A2 - 0)
579 #define BSP430_PERIPH_USCI5_A2 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_A2_BASEADDRESS_))
597 #ifndef configBSP430_HPL_USCI5_A3
598 #define configBSP430_HPL_USCI5_A3 (configBSP430_HAL_USCI5_A3 - 0)
601 #if (configBSP430_HAL_USCI5_A3 - 0) && ! (configBSP430_HPL_USCI5_A3 - 0)
602 #warning configBSP430_HAL_USCI5_A3 requested without configBSP430_HPL_USCI5_A3
611 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A3 - 0)
612 #define BSP430_PERIPH_USCI5_A3 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_A3_BASEADDRESS_))
630 #ifndef configBSP430_HPL_USCI5_B0
631 #define configBSP430_HPL_USCI5_B0 (configBSP430_HAL_USCI5_B0 - 0)
634 #if (configBSP430_HAL_USCI5_B0 - 0) && ! (configBSP430_HPL_USCI5_B0 - 0)
635 #warning configBSP430_HAL_USCI5_B0 requested without configBSP430_HPL_USCI5_B0
644 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B0 - 0)
645 #define BSP430_PERIPH_USCI5_B0 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_B0_BASEADDRESS_))
663 #ifndef configBSP430_HPL_USCI5_B1
664 #define configBSP430_HPL_USCI5_B1 (configBSP430_HAL_USCI5_B1 - 0)
667 #if (configBSP430_HAL_USCI5_B1 - 0) && ! (configBSP430_HPL_USCI5_B1 - 0)
668 #warning configBSP430_HAL_USCI5_B1 requested without configBSP430_HPL_USCI5_B1
677 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B1 - 0)
678 #define BSP430_PERIPH_USCI5_B1 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_B1_BASEADDRESS_))
696 #ifndef configBSP430_HPL_USCI5_B2
697 #define configBSP430_HPL_USCI5_B2 (configBSP430_HAL_USCI5_B2 - 0)
700 #if (configBSP430_HAL_USCI5_B2 - 0) && ! (configBSP430_HPL_USCI5_B2 - 0)
701 #warning configBSP430_HAL_USCI5_B2 requested without configBSP430_HPL_USCI5_B2
710 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B2 - 0)
711 #define BSP430_PERIPH_USCI5_B2 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_B2_BASEADDRESS_))
729 #ifndef configBSP430_HPL_USCI5_B3
730 #define configBSP430_HPL_USCI5_B3 (configBSP430_HAL_USCI5_B3 - 0)
733 #if (configBSP430_HAL_USCI5_B3 - 0) && ! (configBSP430_HPL_USCI5_B3 - 0)
734 #warning configBSP430_HAL_USCI5_B3 requested without configBSP430_HPL_USCI5_B3
743 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B3 - 0)
744 #define BSP430_PERIPH_USCI5_B3 ((tBSP430periphHandle)(BSP430_PERIPH_USCI5_B3_BASEADDRESS_))
759 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A0 - 0)
760 #define BSP430_HPL_USCI5_A0 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_A0)
770 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A1 - 0)
771 #define BSP430_HPL_USCI5_A1 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_A1)
781 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A2 - 0)
782 #define BSP430_HPL_USCI5_A2 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_A2)
792 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_A3 - 0)
793 #define BSP430_HPL_USCI5_A3 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_A3)
803 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B0 - 0)
804 #define BSP430_HPL_USCI5_B0 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_B0)
814 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B1 - 0)
815 #define BSP430_HPL_USCI5_B1 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_B1)
825 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B2 - 0)
826 #define BSP430_HPL_USCI5_B2 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_B2)
836 #if defined(BSP430_DOXYGEN) || (configBSP430_HPL_USCI5_B3 - 0)
837 #define BSP430_HPL_USCI5_B3 ((volatile sBSP430hplUSCI5 *)BSP430_PERIPH_USCI5_B3)
860 #ifndef configBSP430_HAL_USCI5_A0_ISR
861 #define configBSP430_HAL_USCI5_A0_ISR (configBSP430_HAL_USCI5_A0 - 0)
864 #if (configBSP430_HAL_USCI5_A0_ISR - 0) && ! (configBSP430_HAL_USCI5_A0 - 0)
865 #warning configBSP430_HAL_USCI5_A0_ISR requested without configBSP430_HAL_USCI5_A0
883 #ifndef configBSP430_HAL_USCI5_A1_ISR
884 #define configBSP430_HAL_USCI5_A1_ISR (configBSP430_HAL_USCI5_A1 - 0)
887 #if (configBSP430_HAL_USCI5_A1_ISR - 0) && ! (configBSP430_HAL_USCI5_A1 - 0)
888 #warning configBSP430_HAL_USCI5_A1_ISR requested without configBSP430_HAL_USCI5_A1
906 #ifndef configBSP430_HAL_USCI5_A2_ISR
907 #define configBSP430_HAL_USCI5_A2_ISR (configBSP430_HAL_USCI5_A2 - 0)
910 #if (configBSP430_HAL_USCI5_A2_ISR - 0) && ! (configBSP430_HAL_USCI5_A2 - 0)
911 #warning configBSP430_HAL_USCI5_A2_ISR requested without configBSP430_HAL_USCI5_A2
929 #ifndef configBSP430_HAL_USCI5_A3_ISR
930 #define configBSP430_HAL_USCI5_A3_ISR (configBSP430_HAL_USCI5_A3 - 0)
933 #if (configBSP430_HAL_USCI5_A3_ISR - 0) && ! (configBSP430_HAL_USCI5_A3 - 0)
934 #warning configBSP430_HAL_USCI5_A3_ISR requested without configBSP430_HAL_USCI5_A3
952 #ifndef configBSP430_HAL_USCI5_B0_ISR
953 #define configBSP430_HAL_USCI5_B0_ISR (configBSP430_HAL_USCI5_B0 - 0)
956 #if (configBSP430_HAL_USCI5_B0_ISR - 0) && ! (configBSP430_HAL_USCI5_B0 - 0)
957 #warning configBSP430_HAL_USCI5_B0_ISR requested without configBSP430_HAL_USCI5_B0
975 #ifndef configBSP430_HAL_USCI5_B1_ISR
976 #define configBSP430_HAL_USCI5_B1_ISR (configBSP430_HAL_USCI5_B1 - 0)
979 #if (configBSP430_HAL_USCI5_B1_ISR - 0) && ! (configBSP430_HAL_USCI5_B1 - 0)
980 #warning configBSP430_HAL_USCI5_B1_ISR requested without configBSP430_HAL_USCI5_B1
998 #ifndef configBSP430_HAL_USCI5_B2_ISR
999 #define configBSP430_HAL_USCI5_B2_ISR (configBSP430_HAL_USCI5_B2 - 0)
1002 #if (configBSP430_HAL_USCI5_B2_ISR - 0) && ! (configBSP430_HAL_USCI5_B2 - 0)
1003 #warning configBSP430_HAL_USCI5_B2_ISR requested without configBSP430_HAL_USCI5_B2
1021 #ifndef configBSP430_HAL_USCI5_B3_ISR
1022 #define configBSP430_HAL_USCI5_B3_ISR (configBSP430_HAL_USCI5_B3 - 0)
1025 #if (configBSP430_HAL_USCI5_B3_ISR - 0) && ! (configBSP430_HAL_USCI5_B3 - 0)
1026 #warning configBSP430_HAL_USCI5_B3_ISR requested without configBSP430_HAL_USCI5_B3
1034 unsigned char ctl0_byte,
1035 unsigned char ctl1_byte,
1036 unsigned long baud);
1040 unsigned char ctl0_byte,
1041 unsigned char ctl1_byte,
1042 unsigned int prescaler);
1073 const uint8_t * tx_data,
1090 const uint8_t * tx_data,
1107 #if (configBSP430_HPL_USCI5_A0 - 0)
1113 #if (configBSP430_HPL_USCI5_A1 - 0)
1119 #if (configBSP430_HPL_USCI5_A2 - 0)
1125 #if (configBSP430_HPL_USCI5_A3 - 0)
1131 #if (configBSP430_HPL_USCI5_B0 - 0)
1137 #if (configBSP430_HPL_USCI5_B1 - 0)
1143 #if (configBSP430_HPL_USCI5_B2 - 0)
1149 #if (configBSP430_HPL_USCI5_B3 - 0)
1173 #if (configBSP430_HAL_USCI5_A0 - 0)
1179 #if (configBSP430_HAL_USCI5_A1 - 0)
1185 #if (configBSP430_HAL_USCI5_A2 - 0)
1191 #if (configBSP430_HAL_USCI5_A3 - 0)
1197 #if (configBSP430_HAL_USCI5_B0 - 0)
1203 #if (configBSP430_HAL_USCI5_B1 - 0)
1209 #if (configBSP430_HAL_USCI5_B2 - 0)
1215 #if (configBSP430_HAL_USCI5_B3 - 0)
#define BSP430_HAL_USCI5_B0
Definition: usci5.h:362
int iBSP430usci5SetReset_rh(hBSP430halSERIAL hal, int resetp)
unsigned char abctl
Definition: usci5.h:140
unsigned char stat
Definition: usci5.h:132
struct sBSP430hplUSCI5 sBSP430hplUSCI5
#define BSP430_HAL_USCI5_B1
Definition: usci5.h:399
#define BSP430_PERIPH_USCI5_B3
Definition: usci5.h:744
int iBSP430usci5UARTtxASCIIZ_rh(hBSP430halSERIAL device, const char *str)
unsigned char br1
Definition: usci5.h:122
hBSP430halSERIAL hBSP430usci5OpenSPI(hBSP430halSERIAL hal, unsigned char ctl0_byte, unsigned char ctl1_byte, unsigned int prescaler)
unsigned int i2coa
Definition: usci5.h:143
hBSP430halSERIAL hBSP430usci5OpenUART(hBSP430halSERIAL hal, unsigned char ctl0_byte, unsigned char ctl1_byte, unsigned long baud)
int iBSP430usci5I2CsetAddresses_rh(hBSP430halSERIAL hal, int own_address, int slave_address)
int iBSP430usci5UARTtxByte_rh(hBSP430halSERIAL device, uint8_t c)
#define BSP430_HPL_USCI5_A2
Definition: usci5.h:782
void vBSP430usci5Flush_ni(hBSP430halSERIAL device)
unsigned char irrctl
Definition: usci5.h:149
#define BSP430_HAL_USCI5_B2
Definition: usci5.h:436
int iBSP430usci5SetHold_rh(hBSP430halSERIAL hal, int holdp)
void vBSP430usci5WakeupTransmit_rh(hBSP430halSERIAL device)
#define BSP430_PERIPH_USCI5_B1
Definition: usci5.h:678
#define BSP430_PERIPH_USCI5_A2
Definition: usci5.h:579
unsigned int ctlw0
Definition: usci5.h:110
unsigned char irtctl
Definition: usci5.h:148
Definition: serial_.h:193
#define BSP430_HAL_USCI5_A1
Definition: usci5.h:251
unsigned int brw
Definition: usci5.h:119
#define BSP430_HAL_USCI5_A3
Definition: usci5.h:325
static BSP430_CORE_INLINE hBSP430halSERIAL hBSP430usci5Lookup(tBSP430periphHandle periph)
Definition: usci5.h:1169
#define BSP430_HAL_USCI5_A2
Definition: usci5.h:288
unsigned char ie
Definition: usci5.h:160
int iBSP430usci5Close(hBSP430halSERIAL xUSCI)
#define BSP430_HPL_USCI5_A0
Definition: usci5.h:760
#define BSP430_PERIPH_USCI5_A0
Definition: usci5.h:513
#define BSP430_HPL_USCI5_B0
Definition: usci5.h:804
#define BSP430_PERIPH_USCI5_A3
Definition: usci5.h:612
#define BSP430_CORE_INLINE
Definition: core.h:439
Generic peripheral support for MSP430 MCUs.
unsigned char ifg
Definition: usci5.h:161
int iBSP430usci5UARTtxData_rh(hBSP430halSERIAL device, const uint8_t *data, size_t len)
unsigned char ctl1
Definition: usci5.h:112
int iBSP430usci5I2CtxData_rh(hBSP430halSERIAL hal, const uint8_t *tx_data, size_t tx_len)
#define BSP430_HPL_USCI5_A1
Definition: usci5.h:771
#define BSP430_HPL_USCI5_B1
Definition: usci5.h:815
#define BSP430_HAL_USCI5_A0
Definition: usci5.h:214
#define BSP430_HAL_USCI5_B3
Definition: usci5.h:473
int iBSP430usci5SPITxRx_rh(hBSP430halSERIAL hal, const uint8_t *tx_data, size_t tx_len, size_t rx_len, uint8_t *rx_data)
#define BSP430_HPL_USCI5_B2
Definition: usci5.h:826
unsigned char br0
Definition: usci5.h:121
int iBSP430usci5I2CrxData_rh(hBSP430halSERIAL hal, uint8_t *rx_data, size_t rx_len)
int tBSP430periphHandle
Definition: periph.h:106
#define BSP430_HPL_USCI5_A3
Definition: usci5.h:793
static BSP430_CORE_INLINE volatile sBSP430hplUSCI5 * xBSP430hplLookupUSCI5(tBSP430periphHandle periph)
Definition: usci5.h:1103
unsigned int i2csa
Definition: usci5.h:151
const char * xBSP430usci5Name(tBSP430periphHandle periph)
unsigned char txbuf
Definition: usci5.h:136
unsigned int ictl
Definition: usci5.h:158
#define BSP430_HPL_USCI5_B3
Definition: usci5.h:837
Structures for abstracted serial interface.
unsigned int iv
Definition: usci5.h:164
int iBSP430usci5UARTrxByte_rh(hBSP430halSERIAL device)
unsigned char mctl
Definition: usci5.h:127
#define BSP430_PERIPH_USCI5_A1
Definition: usci5.h:546
#define BSP430_PERIPH_USCI5_B2
Definition: usci5.h:711
unsigned char rxbuf
Definition: usci5.h:134
#define BSP430_PERIPH_USCI5_B0
Definition: usci5.h:645
unsigned int irctl
Definition: usci5.h:146
unsigned char ctl0
Definition: usci5.h:113