Solar panel
Loading...
Searching...
No Matches
eusart1.h
Go to the documentation of this file.
1
24/*
25 (c) 2018 Microchip Technology Inc. and its subsidiaries.
26
27 Subject to your compliance with these terms, you may use Microchip software and any
28 derivatives exclusively with Microchip products. It is your responsibility to comply with third party
29 license terms applicable to your use of third party software (including open source software) that
30 may accompany Microchip software.
31
32 THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
33 EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
34 IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
35 FOR A PARTICULAR PURPOSE.
36
37 IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
38 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
39 WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
40 HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
41 THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
42 CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
43 OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
44 SOFTWARE.
45*/
46
47#ifndef EUSART1_H
48#define EUSART1_H
49
54#include <xc.h>
55#include <stdbool.h>
56#include <stdint.h>
57
58#ifdef __cplusplus // Provide C++ Compatibility
59
60 extern "C" {
61
62#endif
63
64
69#define EUSART1_DataReady (EUSART1_is_rx_ready())
70
75typedef union {
76 struct {
77 unsigned perr : 1;
78 unsigned ferr : 1;
79 unsigned oerr : 1;
80 unsigned reserved : 5;
81 };
82 uint8_t status;
84
88extern volatile uint8_t eusart1TxBufferRemaining;
89extern volatile uint8_t eusart1RxCount;
90
94extern void (*EUSART1_RxDefaultInterruptHandler)(void);
95
116void EUSART1_Initialize(void);
117
164bool EUSART1_is_tx_ready(void);
165
212bool EUSART1_is_rx_ready(void);
213
259bool EUSART1_is_tx_done(void);
260
308
327uint8_t EUSART1_Read(void);
328
347void EUSART1_Write(uint8_t txData);
348
349
369void EUSART1_Receive_ISR(void);
370
390void EUSART1_RxDataHandler(void);
391
408void EUSART1_SetFramingErrorHandler(void (* interruptHandler)(void));
409
426void EUSART1_SetOverrunErrorHandler(void (* interruptHandler)(void));
427
444void EUSART1_SetErrorHandler(void (* interruptHandler)(void));
445
446
465void EUSART1_SetRxInterruptHandler(void (* interruptHandler)(void));
466
467#ifdef __cplusplus // Provide C++ Compatibility
468
469 }
470
471#endif
472
473#endif // EUSART1_H
void EUSART1_RxDataHandler(void)
Definition: eusart1.c:197
void EUSART1_Initialize(void)
Definition: eusart1.c:83
void EUSART1_SetErrorHandler(void(*interruptHandler)(void))
Definition: eusart1.c:229
bool EUSART1_is_tx_ready(void)
Definition: eusart1.c:121
eusart1_status_t EUSART1_get_last_status(void)
Definition: eusart1.c:136
bool EUSART1_is_rx_ready(void)
Definition: eusart1.c:126
volatile uint8_t eusart1TxBufferRemaining
void EUSART1_SetRxInterruptHandler(void(*interruptHandler)(void))
Definition: eusart1.c:234
void EUSART1_Write(uint8_t txData)
Definition: eusart1.c:162
bool EUSART1_is_tx_done(void)
Definition: eusart1.c:131
void EUSART1_SetOverrunErrorHandler(void(*interruptHandler)(void))
Definition: eusart1.c:225
void(* EUSART1_RxDefaultInterruptHandler)(void)
Definition: eusart1.c:73
void EUSART1_SetFramingErrorHandler(void(*interruptHandler)(void))
Definition: eusart1.c:221
uint8_t EUSART1_Read(void)
Definition: eusart1.c:140
volatile uint8_t eusart1RxCount
Definition: eusart1.c:67
void EUSART1_Receive_ISR(void)
Definition: eusart1.c:173
unsigned reserved
Definition: eusart1.h:80
unsigned oerr
Definition: eusart1.h:79
uint8_t status
Definition: eusart1.h:82
unsigned ferr
Definition: eusart1.h:78
unsigned perr
Definition: eusart1.h:77