| RTOS_MSPM0 1.1 ECE445M starter code

RTOS_UART.h
1
32 #ifndef __UART_H__
33 #define __UART_H__
34 // standard ASCII symbols
38 #define CR 0x0D
42 #define LF 0x0A
46 #define BS 0x08
50 #define ESC 0x1B
54 #define SP 0x20
58 #define DEL 0x7F
59 /*
60 * Derived from uart_rw_multibyte_fifo_poll_LP_MSPM0G3507_nortos_ticlang
61 */
62
63
77 void UART_Init(uint32_t priority);
78
85 char UART_InChar(void);
86
87
94 void UART_OutChar(char data);
95
96
103 void UART_OutString(char *pt);
104
105
116 uint32_t UART_InUDec(void);
117
125 void UART_OutUDec(uint32_t n);
126
134 void UART_OutUDec3(uint32_t n);
135
143 void UART_OutUDec5(uint32_t n);
144
152 void UART_OutSDec(int32_t n);
153
166 uint32_t UART_InUHex(void);
167
175 void UART_OutUHex(uint32_t number);
176
184 void UART_OutUHex2(uint32_t number);
185
201 void UART_InString(char *bufPt, uint16_t max);
214 void UART_Fix2(long number);
223 void UART_InitPrintf(void);
224
225
226 // initialize UART1 for 115200 baud rate
227 void UART1_Init(void);
228
229 //------------UART1_InChar------------
230 // Wait for new serial port input
231 // Input: none
232 // Output: ASCII code for key typed
233 char UART1_InChar(void);
234 //------------UART1_OutChar------------
235 // Output 8-bit to serial port
236 // Input: letter is an 8-bit ASCII character to be transferred
237 // Output: none
238 void UART1_OutChar(char data);
239
240 #endif // __UART_H__
UART_InChar
char UART_InChar(void)
input from UART0
UART_InUDec
uint32_t UART_InUDec(void)
input a number from UART0
UART_OutUHex
void UART_OutUHex(uint32_t number)
output a hex number to UART0
UART_OutUDec5
void UART_OutUDec5(uint32_t n)
output a number to UART0
UART_OutString
void UART_OutString(char *pt)
output string to UART0
UART_Init
void UART_Init(uint32_t priority)
Initialize UART0.
UART_InString
void UART_InString(char *bufPt, uint16_t max)
input a string from UART0
UART_OutChar
void UART_OutChar(char data)
output character to UART0
UART_InUHex
uint32_t UART_InUHex(void)
input a hex number from UART0
UART_OutUDec3
void UART_OutUDec3(uint32_t n)
output a number to UART0
UART_InitPrintf
void UART_InitPrintf(void)
Initialize UART0 to use printf.
UART_OutUDec
void UART_OutUDec(uint32_t n)
output a number to UART0
UART_OutUHex2
void UART_OutUHex2(uint32_t number)
output a 2-digit hex number to UART0
UART_Fix2
void UART_Fix2(long number)
output a fixed-point number to UART0
UART_OutSDec
void UART_OutSDec(int32_t n)
output a signed number to UART0