sbgInterfaceSerial.h
Go to the documentation of this file.
1 
21 #ifndef SBG_INTERFACE_SERIAL_H
22 #define SBG_INTERFACE_SERIAL_H
23 
24 //----------------------------------------------------------------------//
25 //- Header (open extern C block) -//
26 //----------------------------------------------------------------------//
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include "sbgInterface.h"
32 
33 //----------------------------------------------------------------------//
34 //- Definitions -//
35 //----------------------------------------------------------------------//
36 #define SBG_IF_SERIAL_TX_BUFFER_SIZE (4096u)
37 #define SBG_IF_SERIAL_RX_BUFFER_SIZE (4096u)
39 //----------------------------------------------------------------------//
40 //- Structures definitions -//
41 //----------------------------------------------------------------------//
42 
43 //----------------------------------------------------------------------//
44 //- Operations methods declarations -//
45 //----------------------------------------------------------------------//
46 
54 SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialCreate(SbgInterface *pHandle, const char *deviceName, uint32_t baudRate);
55 
62 
70 
71 //----------------------------------------------------------------------//
72 //- Internal interfaces write/read implementations -//
73 //----------------------------------------------------------------------//
74 
82 SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialWrite(SbgInterface *pHandle, const void *pBuffer, size_t bytesToWrite);
83 
92 SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialRead(SbgInterface *pHandle, void *pBuffer, size_t *pReadBytes, size_t bytesToRead);
93 
100 
101 //----------------------------------------------------------------------//
102 //- Footer (close extern C block) -//
103 //----------------------------------------------------------------------//
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* SBG_INTERFACE_SERIAL_H */
This file implements the base interface for all Serial and Ethernet ports.
#define SBG_COMMON_LIB_API
Definition: sbgDefines.h:58
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialDestroy(SbgInterface *pHandle)
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialWrite(SbgInterface *pHandle, const void *pBuffer, size_t bytesToWrite)
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialCreate(SbgInterface *pHandle, const char *deviceName, uint32_t baudRate)
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialFlush(SbgInterface *pHandle)
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialChangeBaudrate(SbgInterface *pHandle, uint32_t baudRate)
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialRead(SbgInterface *pHandle, void *pBuffer, size_t *pReadBytes, size_t bytesToRead)
enum _SbgErrorCode SbgErrorCode


sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:36