Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches
uart_interface.h
1
17/*
18© [2024] Microchip Technology Inc. and its subsidiaries.
19
20 Subject to your compliance with these terms, you may use Microchip
21 software and any derivatives exclusively with Microchip products.
22 You are responsible for complying with 3rd party license terms
23 applicable to your use of 3rd party software (including open source
24 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
25 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
26 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
27 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
28 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
29 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
30 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
31 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
32 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
33 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
34 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
35 THIS SOFTWARE.
36*/
37
38#ifndef UART_INTERFACE_H
39#define UART_INTERFACE_H
40
41// Section: Included Files
42
43#include <stdbool.h>
44#include <stdint.h>
45#include <stddef.h>
46#include "uart_types.h"
47
48// Section: Data Type Definitions
49
56 void (*Initialize)(void);
58
59 void (*Deinitialize)(void);
61
62 uint8_t (*Read)(void);
64
65 void (*Write)(uint8_t);
67
68 bool (*IsRxReady)(void);
70
71 bool (*IsTxReady)(void);
73
74 bool (*IsTxDone)(void);
76
77 void (*TransmitEnable)(void);
79
80 void (*TransmitDisable)(void);
82
85
88
89 void (*AutoBaudSet)(bool enable);
91
92 bool (*AutoBaudQuery)(void);
94
97
98 void (*BRGCountSet)(uint32_t brgValue);
100
101 uint32_t (*BRGCountGet)(void);
103
104 void (*BaudRateSet)(uint32_t baudRate);
106
107 uint32_t (*BaudRateGet)(void);
109
110 size_t (*ErrorGet)(void);
112
113 void (*RxCompleteCallbackRegister)(void (*CallbackHandler)(void));
115 void (*TxCompleteCallbackRegister)(void (*CallbackHandler)(void));
117 void (*TxCollisionCallbackRegister)(void (*CallbackHandler)(void));
119 void (*FramingErrorCallbackRegister)(void (*CallbackHandler)(void));
121 void (*OverrunErrorCallbackRegister)(void (*CallbackHandler)(void));
123 void (*ParityErrorCallbackRegister)(void (*CallbackHandler)(void));
125};
126#endif
127
This is the generated driver types header file for the UART driver.
Structure containing the function pointers of UART driver.
bool(* IsRxReady)(void)
Pointer to UARTx_IsRxReady e.g. UART1_IsRxReady.
bool(* AutoBaudQuery)(void)
Pointer to UARTx_AutoBaudQuery e.g. UART1_AutoBaudQuery.
bool(* IsTxReady)(void)
Pointer to UARTx_IsTxReady e.g. UART1_IsTxReady.
void(* BRGCountSet)(uint32_t brgValue)
Pointer to UARTx_BRGCountSet e.g. UART1_BRGCountSet.
void(* TransmitEnable)(void)
Pointer to UARTx_TransmitEnable e.g. UART1_TransmitEnable.
uint8_t(* Read)(void)
Pointer to UARTx_Read e.g. UART1_Read.
uint32_t(* BaudRateGet)(void)
Pointer to UARTx_BaudRateGet e.g. UART1_BaudRateGet.
void(* BaudRateSet)(uint32_t baudRate)
Pointer to UARTx_BaudRateSet e.g. UART1_BaudRateSet.
void(* TransmitDisable)(void)
Pointer to UARTx_TransmitDisable e.g. UART1_TransmitDisable.
void(* TxCompleteCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_TxCompleteCallbackRegister e.g. UART1_TxCompleteCallbackRegister (defined only in in...
void(* OverrunErrorCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_OverrunErrorCallbackRegister e.g. UART1_OverrunErrorCallbackRegister (defined only i...
size_t(* ErrorGet)(void)
Pointer to UARTx_ErrorGet e.g. UART1_ErrorGet.
void(* FramingErrorCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_FramingErrorCallbackRegister e.g. UART1_FramingErrorCallbackRegister (defined only i...
void(* Write)(uint8_t)
Pointer to UARTx_Write e.g. UART1_Write.
uint32_t(* BRGCountGet)(void)
Pointer to UARTx_BRGCOuntGet e.g. UART1_BRGCountGet.
void(* TransmitInterruptDisable)(void)
Pointer to UARTx_TransmitInterruptDisable e.g. UART1_TransmitInterruptDisable.
void(* TransmitInterruptEnable)(void)
Pointer to UARTx_TransmitInterruptEnable e.g. UART1_TransmitInterruptEnable.
bool(* AutoBaudEventEnableGet)(void)
Pointer to UARTx_AutoBaudEventEnableGet e.g. UART1_AutoBaudEventEnableGet.
void(* ParityErrorCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_ParityErrorCallbackRegister e.g. UART1_ParityErrorCallbackRegister (defined only in ...
void(* RxCompleteCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_RxCompleteCallbackRegister e.g. UART1_RxCompleteCallbackRegister (defined only in in...
void(* Deinitialize)(void)
Pointer to UARTx_Deinitialize e.g. UART1_Deinitialize.
void(* AutoBaudSet)(bool enable)
Pointer to UARTx_AutoBaudSet e.g. UART1_AutoBaudSet.
void(* TxCollisionCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_TxCollisionCallbackRegister e.g. UART1_TxCollisionCallbackRegister (defined only in ...
bool(* IsTxDone)(void)
Pointer to UARTx_IsTxDone e.g. UART1_IsTxDone.
void(* Initialize)(void)
Pointer to UARTx_Initialize e.g. UART1_Initialize.