Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
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
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
void UART1_BaudRateSet(uint32_t baudRate)
Sets the calculated Baud-Rate of UART1.
Definition uart1.c:299
void UART1_Initialize(void)
Initializes the UART driver.
Definition uart1.c:104
void UART1_TransmitDisable(void)
Disables UART1 transmit.
Definition uart1.c:231
void UART1_AutoBaudSet(bool enable)
Enables or disables UART1 Auto-Baud detection.
Definition uart1.c:236
bool UART1_IsRxReady(void)
Returns a boolean value if data is available to read.
Definition uart1.c:211
void UART1_TransmitEnable(void)
Enables UART1 transmit.
Definition uart1.c:226
uint8_t UART1_Read(void)
Reads a byte of data from the UART1.
Definition uart1.c:186
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
bool UART1_IsTxDone(void)
Indicates if all bytes have been transferred.
Definition uart1.c:221
void UART1_Write(uint8_t data)
Writes a byte of data to the UART1.
Definition uart1.c:201
size_t UART1_ErrorGet(void)
Returns the error status of UART1.
Definition uart1.c:253
void UART1_Deinitialize(void)
Deinitializes the UART to POR values.
Definition uart1.c:176
bool UART1_AutoBaudQuery(void)
Returns the status of Auto-Baud detection.
Definition uart1.c:243
bool UART1_AutoBaudEventEnableGet(void)
Returns enable state of the Auto-Baud feature.
Definition uart1.c:248
uint32_t UART1_BaudRateGet(void)
Gets the actual Baud-Rate of UART1.
Definition uart1.c:325
uint32_t UART1_BRGCountGet(void)
Gets the BRG value of UART1.
Definition uart1.c:289
bool UART1_IsTxReady(void)
Returns a boolean value if data can be written.
Definition uart1.c:216
void UART1_BRGCountSet(uint32_t brgValue)
Sets the BRG value of UART1.
Definition uart1.c:283
Structure containing the function pointers of UART driver.