![]() |
MKM34Z256VLx7 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This section describes functions and macros of the driver's API.
Macros | |
#define | UART_SetBaudRate(module, brate, clk) |
Set communication baud rate. More... | |
#define | UART_TxIsrDisable(module) |
Disables transmitter interrupt or DMA transfer. More... | |
#define | UART_TxIsrEnable(module) |
Enables transmitter interrupt or DMA transfer. More... | |
#define | UART_TxCmplIsrDisable(module) |
Disables transmission complete interrupt. More... | |
#define | UART_TxCmplIsrEnable(module) |
Enables transmission complete interrupt. More... | |
#define | UART_RxIsrDisable(module) |
Disables receiver full interrupt or DMA transfer. More... | |
#define | UART_RxIsrEnable(module) |
Enables receiver full interrupt or DMA transfer. More... | |
#define | UART_EdgIsrEnable(module) |
Enables RxD input active edge interrupt. More... | |
#define | UART_EdgIsrClr(module) |
Clears RxD input active edge interrupt flag. More... | |
#define | UART_EdgIsrClrEnable(module) |
Clears RxD input active edge interrupt flag and enables RxD input active edge interrupt. More... | |
#define | UART_EdgIsrDisable(module) |
Disables RxD input active edge interrupt. More... | |
#define | UART_TxIdle(module) |
Reads and returns transmitter state. More... | |
#define | UART_RxFull(module) |
Reads and returns receiver state. More... | |
#define | UART_GetChar(module) |
Reads and returns received character. More... | |
#define | UART_PutChar(module, c) |
Sends character. More... | |
#define | UART_PutStr(module, str) |
Sends string. More... | |
#define | UART_Rd(module, buffer, count) |
Reads count bytes and stores them in a buffer . More... | |
#define | UART_Wr(module, buffer, count) |
Writes count bytes from buffer . More... | |
#define | UART_LoopModeCtrl(module, ctrl) |
Enables/disables internal loop mode. More... | |
#define | UART_InstallCallback(ip, callback) |
Installs callback function for UART interrupt vector 35. More... | |
#define | UART_Init(module, cfg) |
UART initialization. More... | |
#define UART_SetBaudRate | ( | module, | |
brate, | |||
clk | |||
) |
This macro sets new communication baudrate.
module | UART0,UART1,UART2,UART3. | ||||||||
brate | Baud rate. | ||||||||
clk | Module clock in Hz:
|
#define UART_TxIsrDisable | ( | module | ) |
This macro disables transmitter interrupt or DMA transfer for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_TxIsrEnable | ( | module | ) |
This macro enables transmitter interrupt or DMA transfer for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_TxCmplIsrDisable | ( | module | ) |
This macro disables transmission complete interrupt request for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_TxCmplIsrEnable | ( | module | ) |
This macro enables transmission complete interrupt request for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_RxIsrDisable | ( | module | ) |
This macro disables receiver full interrupt or DMA transfer for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_RxIsrEnable | ( | module | ) |
This macro enables receiver full interrupt or DMA transfer for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_EdgIsrEnable | ( | module | ) |
This macro enables RxD input active edge interrupt for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_EdgIsrClr | ( | module | ) |
This macro clears RxD input active edge interrupt flag for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_EdgIsrClrEnable | ( | module | ) |
This macro clears RxD input active edge interrupt flag and it also enables RxD input active edge interrupt for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_EdgIsrDisable | ( | module | ) |
This macro disables RxD input active edge interrupt for specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_TxIdle | ( | module | ) |
This macro returns transmitter state of the specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_RxFull | ( | module | ) |
This macro returns receiver state of the specified module.
module | UART0,UART1,UART2,UART3. |
#define UART_GetChar | ( | module | ) |
This macro reads character received by the specified module.
module | UART0,UART1,UART2,UART3. |
while(!UART_RxFull(UART?));
statement prior this macro to ensure new byte is returned. #define UART_PutChar | ( | module, | |
c | |||
) |
This macro sends character to the specified module.
module | UART0,UART1,UART2,UART3. |
c | Character. |
while(!UART_TxIdle(UART?));
statement prior this macro to ensure transmitter is idle and able to send new character. #define UART_PutStr | ( | module, | |
str | |||
) |
This macro sends string to the specified module.
module | UART0,UART1,UART2,UART3. |
str | String terminated by null character. |
#define UART_Rd | ( | module, | |
buffer, | |||
count | |||
) |
This macro reads count
bytes from specified module and stores them in buffer
. Returns when count
bytes have been read.
module | UART0,UART1,UART2,UART3. |
buffer | uint8 [] specifies the variable in which to store the data that was read from the selected module. |
count | specifies the number of bytes to read from the selected module. |
count
bytes are read. #define UART_Wr | ( | module, | |
buffer, | |||
count | |||
) |
This macro writes count
bytes from buffer
to the specified module. Returns when count
bytes are written.
module | UART0,UART1,UART2,UART3. |
buffer | uint8 [] specifies the variable from which to read the data that will be written to the selected module. |
count | specifies the number of bytes to write to the selected module. |
#define UART_LoopModeCtrl | ( | module, | |
ctrl | |||
) |
This macro enables/disables internal loop mode for the specified module. When loop mode is set, the RxD pin is disconnected from the UART and the transmitter output is internally connected to the receiver input. The transmitter and the receiver must be enabled to use the loop function.
module | UART0,UART1,UART2,UART3. |
ctrl | TRUE (loopback mode enabled, receiver input is internally connected to transmitter output) FALSE (normal operation). |
#define UART_InstallCallback | ( | ip, | |
callback | |||
) |
This function installs callback function for UART interrupt vector 35.
ip | Select one of the ARM Cortex-M0+ Interrupt Priority Levels. |
callback | Pointer to the UART Callback Function. |
#define UART_Init | ( | module, | |
cfg | |||
) |
This function initializes selected UART module.
module | UART0,UART1,UART2,UART3. |
cfg | Select one of the UART Configuration Structures. |