monoZ docs
MZ_uart.h File Reference

This file includes monoZ Uart Related APIs. More...

#include "MZ_public.h"
#include "MZ_error_handler.h"

Go to the source code of this file.

Data Structures

struct  MZ_UARTX
 Structure for UART Handling and API events. More...
 
struct  st_uart_intr
 Structure for UART state Handler. More...
 

Macros

#define MZ_UART_H_
 Defines Inc monoZ UART file. More...
 
#define UART_MAX_COUNT_SIZE   UART_MAX_COUNT
 UART Maximum Count Size. More...
 

Typedefs

typedef _mz_fp _uart_api
 [TODO] More...
 
typedef MZ_UARTX MZ_UART_BTYPE
 [TODO] More...
 
typedef MZ_UARTXMZ_UART_BTYPE_PTR
 [TODO] More...
 

Enumerations

enum  en_uart_no {
  _USART1 , _USART2 , _USART3 , _LPUART1 ,
  UART_MAX_COUNT
}
 Define UART on its state. 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

This file includes monoZ Uart Related APIs.

Author
SKM
Date
Mar 3 2021

Definition in file MZ_uart.h.

Macro Definition Documentation

◆ MZ_UART_H_

#define MZ_UART_H_

Defines Inc monoZ UART file.

Definition at line 9 of file MZ_uart.h.

◆ UART_MAX_COUNT_SIZE

#define UART_MAX_COUNT_SIZE   UART_MAX_COUNT

UART Maximum Count Size.

Definition at line 45 of file MZ_uart.h.

Typedef Documentation

◆ _uart_api

[TODO]

monoZ Function Pointer

Definition at line 51 of file MZ_uart.h.

◆ MZ_UART_BTYPE

[TODO]

Definition at line 94 of file MZ_uart.h.

◆ MZ_UART_BTYPE_PTR

[TODO]

Definition at line 100 of file MZ_uart.h.

Enumeration Type Documentation

◆ en_uart_no

enum en_uart_no

Define UART on its state.

Enumerator
_USART1 

Enables the USART1

_USART2 

Enables the USART2

_USART3 

Enables the USART3

_LPUART1 

Enables the LPUART1

UART_MAX_COUNT 

UART Maximum Count

Definition at line 22 of file MZ_uart.h.