Statistics
| Branch: | Tag: | Revision:

mongoose / examples / PIC32 / mqtt_client / firmware / src / system_config / mx795_CC3100_e16 / framework / driver / usart / drv_usart_static.h @ eaef5bd1

History | View | Annotate | Download (5.9 KB)

1
/* clang-format off */
2
/*******************************************************************************
3
  USART Driver Interface Declarations for Static Single Instance Driver
4

5
  Company:
6
    Microchip Technology Inc.
7

8
  File Name:
9
    drv_usart_static.h
10

11
  Summary:
12
    USART driver interface declarations for the static single instance driver.
13

14
  Description:
15
    The USART device driver provides a simple interface to manage the USART
16
    modules on Microchip microcontrollers. This file defines the interface
17
    Declarations for the USART static driver.
18

19
  Remarks:
20
    Static interfaces incorporate the driver instance number within the names
21
    of the routines, eliminating the need for an object ID or object handle.
22

23
    Static single-open interfaces also eliminate the need for the open handle.
24
*******************************************************************************/
25

    
26
//DOM-IGNORE-BEGIN
27
/*******************************************************************************
28
Copyright (c) 2015 released Microchip Technology Inc.  All rights reserved.
29

30
Microchip licenses to you the right to use, modify, copy and distribute
31
Software only when embedded on a Microchip microcontroller or digital signal
32
controller that is integrated into your product or third party product
33
(pursuant to the sublicense terms in the accompanying license agreement).
34

35
You should refer to the license agreement accompanying this Software for
36
additional information regarding your rights and obligations.
37

38
SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
39
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
40
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
41
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
42
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
43
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
44
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
45
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
46
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
47
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
48
*******************************************************************************/
49
//DOM-IGNORE-END
50

    
51
#ifndef _DRV_USART_STATIC_H
52
#define _DRV_USART_STATIC_H
53

    
54
// *****************************************************************************
55
// *****************************************************************************
56
// Section: Included Files
57
// *****************************************************************************
58
// *****************************************************************************
59
#include "driver/usart/src/drv_usart_static_local.h"
60

    
61
// DOM-IGNORE-BEGIN
62
#ifdef __cplusplus  // Provide C++ Compatibility
63

    
64
    extern "C" {
65

    
66
#endif
67
// DOM-IGNORE-END
68

    
69
// *********************************************************************************************
70
// *********************************************************************************************
71
// Section: System Interface Headers for the Instance 0 of USART static driver
72
// *********************************************************************************************
73
// *********************************************************************************************
74

    
75
SYS_MODULE_OBJ DRV_USART0_Initialize(void);
76
void  DRV_USART0_Deinitialize(void);
77
SYS_STATUS DRV_USART0_Status(void);
78
void DRV_USART0_TasksTransmit(void);
79
void DRV_USART0_TasksReceive(void);
80
void DRV_USART0_TasksError(void);
81

    
82
// *********************************************************************************************
83
// *********************************************************************************************
84
// Section: General Client Interface Headers for the Instance 0 of USART static driver
85
// *********************************************************************************************
86
// *********************************************************************************************
87

    
88
DRV_HANDLE DRV_USART0_Open(const SYS_MODULE_INDEX index, const DRV_IO_INTENT ioIntent);
89
void DRV_USART0_Close(void);
90
DRV_USART_CLIENT_STATUS DRV_USART0_ClientStatus(void);
91
DRV_USART_TRANSFER_STATUS DRV_USART0_TransferStatus(void);
92

    
93
// *********************************************************************************************
94
// *********************************************************************************************
95
// Section: Byte Model Client Interface Headers for the Instance 0 of USART static driver
96
// *********************************************************************************************
97
// *********************************************************************************************
98

    
99
uint8_t DRV_USART0_ReadByte( void);
100
void DRV_USART0_WriteByte( const uint8_t byte);
101
unsigned int DRV_USART0_ReceiverBufferSizeGet(void);
102
unsigned int DRV_USART0_TransmitBufferSizeGet(void);
103
bool DRV_USART0_ReceiverBufferIsEmpty( void );
104
bool DRV_USART0_TransmitBufferIsFull(void);
105

    
106
// *********************************************************************************************
107
// *********************************************************************************************
108
// Section: Set up Client Interface Headers for the Instance 0 of USART static driver
109
// *********************************************************************************************
110
// *********************************************************************************************
111
DRV_USART_BAUD_SET_RESULT DRV_USART0_BaudSet(uint32_t baud);
112
DRV_USART_LINE_CONTROL_SET_RESULT DRV_USART0_LineControlSet(DRV_USART_LINE_CONTROL lineControlMode);
113

    
114
// DOM-IGNORE-BEGIN
115
#ifdef __cplusplus
116
}
117
#endif
118
// DOM-IGNORE-END
119

    
120
#endif // #ifndef _DRV_USART_STATIC_H
121
/*******************************************************************************
122
 End of File
123
*/