monoZ docs
UART

-For monoZ UART handler refer MZ_uart.h file. More...

Functions

MZ_UART_BTYPE_PTR MZ_UART_get_base_address (void)
 This function returns the base address of the internal UART context. More...
 
MZ_UART_BTYPE_PTR MZ_UART_reference (en_uart_no uart_no)
 This function returns the address of the specific UART. More...
 
mz_error_t MZ_UART_init (MZ_UART_INIT_PTR _cfg)
 This function initializes the specific UART. More...
 
mz_error_t MZ_UART_register_callback (uint8_t uart_no, _uart_api cb)
 This function registers the event callback function for the specific UART. More...
 
mz_error_t MZ_UART_register_intr_cb_tx (uint8_t uart_no, _uart_api cb)
 This function registers the TX complete callback function for the specific UART. More...
 
mz_error_t MZ_UART_register_intr_cb_rx (uint8_t uart_no, _uart_api cb)
 This function registers the RX complete callback function for the specific UART. More...
 
mz_error_t MZ_UART_Transmit (uint8_t uart_no, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 This function is used to transmit data using UART in polling mode. More...
 
mz_error_t MZ_UART_Receive (uint8_t uart_no, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 This function is used to receive data using UART in polling mode. More...
 
mz_error_t MZ_UART_Transmit_IT (uint8_t uart_no, uint8_t *pData, uint16_t Size)
 This function is used to transmit data using UART in interrupt mode. More...
 
mz_error_t MZ_UART_Receive_IT (uint8_t uart_no, uint8_t *pData, uint16_t Size)
 This function is used to receive data using UART in interrupt mode. More...
 
void MZ_HAL_UART_IRQHandler (uint8_t uart_no)
 This function defines the Global Interrupt handler functions for UART. More...
 

Detailed Description

-For monoZ UART handler refer MZ_uart.h file.

Function Documentation

◆ MZ_UART_get_base_address()

MZ_UART_BTYPE_PTR MZ_UART_get_base_address ( void  )

This function returns the base address of the internal UART context.

Returns
Base address of UART

◆ MZ_UART_reference()

MZ_UART_BTYPE_PTR MZ_UART_reference ( en_uart_no  uart_no)

This function returns the address of the specific UART.

Parameters
uart_no
Returns
Uart Reference

◆ MZ_UART_init()

mz_error_t MZ_UART_init ( MZ_UART_INIT_PTR  _cfg)

This function initializes the specific UART.

Parameters
_cfgMZ_UART_INIT_PTR
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_register_callback()

mz_error_t MZ_UART_register_callback ( uint8_t  uart_no,
_uart_api  cb 
)

This function registers the event callback function for the specific UART.

Parameters
uart_nouint8_t
cb_uart_api
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_register_intr_cb_tx()

mz_error_t MZ_UART_register_intr_cb_tx ( uint8_t  uart_no,
_uart_api  cb 
)

This function registers the TX complete callback function for the specific UART.

Parameters
uart_nouint8_t
cb_uart_api
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_register_intr_cb_rx()

mz_error_t MZ_UART_register_intr_cb_rx ( uint8_t  uart_no,
_uart_api  cb 
)

This function registers the RX complete callback function for the specific UART.

Parameters
uart_nouint8_t
cb_uart_api
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_Transmit()

mz_error_t MZ_UART_Transmit ( uint8_t  uart_no,
uint8_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

This function is used to transmit data using UART in polling mode.

Parameters
uart_nouint8_t
pDatapData
Sizeuint16_t
Timeoutuint32_t
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_Receive()

mz_error_t MZ_UART_Receive ( uint8_t  uart_no,
uint8_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

This function is used to receive data using UART in polling mode.

Parameters
uart_nouint8_t
pDatapData
Sizeuint16_t
Timeoutuint32_t
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_Transmit_IT()

mz_error_t MZ_UART_Transmit_IT ( uint8_t  uart_no,
uint8_t *  pData,
uint16_t  Size 
)

This function is used to transmit data using UART in interrupt mode.

Parameters
uart_nouint8_t
pDatapData
Sizeuint16_t
Returns
MZ_OK/MZ_FAIL

◆ MZ_UART_Receive_IT()

mz_error_t MZ_UART_Receive_IT ( uint8_t  uart_no,
uint8_t *  pData,
uint16_t  Size 
)

This function is used to receive data using UART in interrupt mode.

Parameters
uart_nouint8_t
pDatapData
Sizeuint16_t
Returns
MZ_OK/MZ_FAIL

◆ MZ_HAL_UART_IRQHandler()

void MZ_HAL_UART_IRQHandler ( uint8_t  uart_no)

This function defines the Global Interrupt handler functions for UART.

Parameters
uart_nouint8_t