|  | Dual Active Bridge Development Board (Part-No. ) |
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
55 struct UART_INTERFACE{
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
83 void (*TransmitInterruptEnable)(void);
85
86 void (*TransmitInterruptDisable)(void);
88
89 void (*AutoBaudSet)(bool enable);
91
92 bool (*AutoBaudQuery)(void);
94
95 bool (*AutoBaudEventEnableGet)(void);
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
uart_types.h
This is the generated driver types header file for the UART driver.
UART_INTERFACE
Structure containing the function pointers of UART driver.
Definition uart_interface.h:55
UART_INTERFACE::IsRxReady
bool(* IsRxReady)(void)
Pointer to UARTx_IsRxReady e.g. UART1_IsRxReady.
Definition uart_interface.h:68
UART_INTERFACE::AutoBaudQuery
bool(* AutoBaudQuery)(void)
Pointer to UARTx_AutoBaudQuery e.g. UART1_AutoBaudQuery.
Definition uart_interface.h:92
UART_INTERFACE::IsTxReady
bool(* IsTxReady)(void)
Pointer to UARTx_IsTxReady e.g. UART1_IsTxReady.
Definition uart_interface.h:71
UART_INTERFACE::BRGCountSet
void(* BRGCountSet)(uint32_t brgValue)
Pointer to UARTx_BRGCountSet e.g. UART1_BRGCountSet.
Definition uart_interface.h:98
UART_INTERFACE::TransmitEnable
void(* TransmitEnable)(void)
Pointer to UARTx_TransmitEnable e.g. UART1_TransmitEnable.
Definition uart_interface.h:77
UART_INTERFACE::Read
uint8_t(* Read)(void)
Pointer to UARTx_Read e.g. UART1_Read.
Definition uart_interface.h:62
UART_INTERFACE::BaudRateGet
uint32_t(* BaudRateGet)(void)
Pointer to UARTx_BaudRateGet e.g. UART1_BaudRateGet.
Definition uart_interface.h:107
UART_INTERFACE::BaudRateSet
void(* BaudRateSet)(uint32_t baudRate)
Pointer to UARTx_BaudRateSet e.g. UART1_BaudRateSet.
Definition uart_interface.h:104
UART_INTERFACE::TransmitDisable
void(* TransmitDisable)(void)
Pointer to UARTx_TransmitDisable e.g. UART1_TransmitDisable.
Definition uart_interface.h:80
UART_INTERFACE::TxCompleteCallbackRegister
void(* TxCompleteCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_TxCompleteCallbackRegister e.g. UART1_TxCompleteCallbackRegister (defined only in in...
Definition uart_interface.h:115
UART_INTERFACE::OverrunErrorCallbackRegister
void(* OverrunErrorCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_OverrunErrorCallbackRegister e.g. UART1_OverrunErrorCallbackRegister (defined only i...
Definition uart_interface.h:121
UART_INTERFACE::ErrorGet
size_t(* ErrorGet)(void)
Pointer to UARTx_ErrorGet e.g. UART1_ErrorGet.
Definition uart_interface.h:110
UART_INTERFACE::FramingErrorCallbackRegister
void(* FramingErrorCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_FramingErrorCallbackRegister e.g. UART1_FramingErrorCallbackRegister (defined only i...
Definition uart_interface.h:119
UART_INTERFACE::Write
void(* Write)(uint8_t)
Pointer to UARTx_Write e.g. UART1_Write.
Definition uart_interface.h:65
UART_INTERFACE::BRGCountGet
uint32_t(* BRGCountGet)(void)
Pointer to UARTx_BRGCOuntGet e.g. UART1_BRGCountGet.
Definition uart_interface.h:101
UART_INTERFACE::TransmitInterruptDisable
void(* TransmitInterruptDisable)(void)
Pointer to UARTx_TransmitInterruptDisable e.g. UART1_TransmitInterruptDisable.
Definition uart_interface.h:86
UART_INTERFACE::TransmitInterruptEnable
void(* TransmitInterruptEnable)(void)
Pointer to UARTx_TransmitInterruptEnable e.g. UART1_TransmitInterruptEnable.
Definition uart_interface.h:83
UART_INTERFACE::AutoBaudEventEnableGet
bool(* AutoBaudEventEnableGet)(void)
Pointer to UARTx_AutoBaudEventEnableGet e.g. UART1_AutoBaudEventEnableGet.
Definition uart_interface.h:95
UART_INTERFACE::ParityErrorCallbackRegister
void(* ParityErrorCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_ParityErrorCallbackRegister e.g. UART1_ParityErrorCallbackRegister (defined only in ...
Definition uart_interface.h:123
UART_INTERFACE::RxCompleteCallbackRegister
void(* RxCompleteCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_RxCompleteCallbackRegister e.g. UART1_RxCompleteCallbackRegister (defined only in in...
Definition uart_interface.h:113
UART_INTERFACE::Deinitialize
void(* Deinitialize)(void)
Pointer to UARTx_Deinitialize e.g. UART1_Deinitialize.
Definition uart_interface.h:59
UART_INTERFACE::AutoBaudSet
void(* AutoBaudSet)(bool enable)
Pointer to UARTx_AutoBaudSet e.g. UART1_AutoBaudSet.
Definition uart_interface.h:89
UART_INTERFACE::TxCollisionCallbackRegister
void(* TxCollisionCallbackRegister)(void(*CallbackHandler)(void))
Pointer to UARTx_TxCollisionCallbackRegister e.g. UART1_TxCollisionCallbackRegister (defined only in ...
Definition uart_interface.h:117
UART_INTERFACE::IsTxDone
bool(* IsTxDone)(void)
Pointer to UARTx_IsTxDone e.g. UART1_IsTxDone.
Definition uart_interface.h:74
UART_INTERFACE::Initialize
void(* Initialize)(void)
Pointer to UARTx_Initialize e.g. UART1_Initialize.
Definition uart_interface.h:56