|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
uart1.h
Go to the documentation of this file.
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 UART1_H
39#define UART1_H
40
41// Section: Included Files
42
43#include <stdbool.h>
44#include <stdint.h>
45#include <stddef.h>
46#include "uart_interface.h"
47
48// Section: Data Type Definitions
49
60extern const struct UART_INTERFACE UART1_Drv;
61
66#define UART1_Drv_Initialize UART1_Initialize
67
72#define UART1_Drv_Deinitialize UART1_Deinitialize
73
78#define UART1_Drv_Read UART1_Read
79
84#define UART1_Drv_Write UART1_Write
85
90#define UART1_Drv_IsRxReady UART1_IsRxReady
91
96#define UART1_Drv_IsTxReady UART1_IsTxReady
97
102#define UART1_Drv_IsTxDone UART1_IsTxDone
103
108#define UART1_Drv_TransmitEnable UART1_TransmitEnable
109
114#define UART1_Drv_TransmitDisable UART1_TransmitDisable
115
120#define UART1_Drv_AutoBaudSet UART1_AutoBaudSet
121
126#define UART1_Drv_AutoBaudQuery UART1_AutoBaudQuery
127
132#define UART1_Drv_AutoBaudEventEnableGet UART1_AutoBaudEventEnableGet
133
138#define UART1_Drv_ErrorGet UART1_ErrorGet
139
144#define UART1_Drv_BRGCountSet UART1_BRGCountSet
145
150#define UART1_Drv_BRGCountGet UART1_BRGCountGet
151
156#define UART1_Drv_BaudRateSet UART1_BaudRateSet
157
162#define UART1_Drv_BaudRateGet UART1_BaudRateGet
163
164// Section: UART1 Driver Routines
165
172void UART1_Initialize(void);
173
180void UART1_Deinitialize(void);
181
191uint8_t UART1_Read(void);
192
202void UART1_Write(uint8_t data);
203
211bool UART1_IsRxReady(void);
212
220bool UART1_IsTxReady(void);
221
229bool UART1_IsTxDone(void);
230
237void UART1_TransmitEnable(void);
238
245void UART1_TransmitDisable(void);
246
254void UART1_AutoBaudSet(bool enable);
255
263bool UART1_AutoBaudQuery(void);
264
272bool UART1_AutoBaudEventEnableGet(void);
273
281void UART1_BRGCountSet(uint32_t brgValue);
282
289uint32_t UART1_BRGCountGet(void);
290
298void UART1_BaudRateSet(uint32_t baudRate);
299
306uint32_t UART1_BaudRateGet(void);
307
314size_t UART1_ErrorGet(void);
315
316#endif // UART1_H
317
UART1_BaudRateSet
void UART1_BaudRateSet(uint32_t baudRate)
Sets the calculated Baud-Rate of UART1.
Definition uart1.c:251
UART1_Initialize
void UART1_Initialize(void)
Initializes the UART driver.
Definition uart1.c:104
UART1_TransmitDisable
void UART1_TransmitDisable(void)
Disables UART1 transmit.
Definition uart1.c:183
UART1_AutoBaudSet
void UART1_AutoBaudSet(bool enable)
Enables or disables UART1 Auto-Baud detection.
Definition uart1.c:188
UART1_IsRxReady
bool UART1_IsRxReady(void)
Returns a boolean value if data is available to read.
Definition uart1.c:163
UART1_TransmitEnable
void UART1_TransmitEnable(void)
Enables UART1 transmit.
Definition uart1.c:178
UART1_Read
uint8_t UART1_Read(void)
Reads a byte of data from the UART1.
Definition uart1.c:138
UART1_Drv
const struct UART_INTERFACE UART1_Drv
Structure object of type UART_INTERFACE with the custom name given by the user in the Melody Driver U...
Definition uart1.c:59
UART1_IsTxDone
bool UART1_IsTxDone(void)
Indicates if all bytes have been transferred.
Definition uart1.c:173
UART1_Write
void UART1_Write(uint8_t data)
Writes a byte of data to the UART1.
Definition uart1.c:153
UART1_ErrorGet
size_t UART1_ErrorGet(void)
Returns the error status of UART1.
Definition uart1.c:205
UART1_Deinitialize
void UART1_Deinitialize(void)
Deinitializes the UART to POR values.
Definition uart1.c:128
UART1_AutoBaudQuery
bool UART1_AutoBaudQuery(void)
Returns the status of Auto-Baud detection.
Definition uart1.c:195
UART1_AutoBaudEventEnableGet
bool UART1_AutoBaudEventEnableGet(void)
Returns enable state of the Auto-Baud feature.
Definition uart1.c:200
UART1_BaudRateGet
uint32_t UART1_BaudRateGet(void)
Gets the actual Baud-Rate of UART1.
Definition uart1.c:277
UART1_BRGCountGet
uint32_t UART1_BRGCountGet(void)
Gets the BRG value of UART1.
Definition uart1.c:241
UART1_IsTxReady
bool UART1_IsTxReady(void)
Returns a boolean value if data can be written.
Definition uart1.c:168
UART1_BRGCountSet
void UART1_BRGCountSet(uint32_t brgValue)
Sets the BRG value of UART1.
Definition uart1.c:235
UART_INTERFACE
Structure containing the function pointers of UART driver.
Definition uart_interface.h:55