eLooM for STM32 application  v3.3.0
A framework for multitasking low power embedded applications powerd by STM32
Loading...
Searching...
No Matches
IIODriver_vtbl.h
Go to the documentation of this file.
1
24#ifndef INCLUDE_DRIVERS_IIODRIVER_VTBL_H_
25#define INCLUDE_DRIVERS_IIODRIVER_VTBL_H_
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31
32#include "drivers/IDriver_vtbl.h"
33
38
43 sys_error_code_t (*Init)(IDriver *_this, void *pParams);
44 sys_error_code_t (*Start)(IDriver *_this);
45 sys_error_code_t (*Stop)(IDriver *_this);
46 sys_error_code_t (*DoEnterPowerMode)(IDriver *_this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode);
47 sys_error_code_t (*Reset)(IDriver *_this, void *pParams);
48 sys_error_code_t (*Write)(IIODriver *_this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel);
49 sys_error_code_t (*Read)(IIODriver *_this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel);
50};
51
56struct _IIODriver {
61};
62
63
64// Inline function definition.
65// ***************************
66
68sys_error_code_t IIODrvWrite(IIODriver *_this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel) {
69 return _this->vptr->Write(_this, pDataBuffer, nDataSize, nChannel);
70}
71
73sys_error_code_t IIODrvRead(IIODriver *_this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel) {
74 return _this->vptr->Read(_this, pDataBuffer, nDataSize, nChannel);
75}
76
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* INCLUDE_DRIVERS_IIODRIVER_VTBL_H_ */
SYS_DEFINE_STATIC_INLINE sys_error_code_t IIODrvRead(IIODriver *_this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel)
Definition IIODriver_vtbl.h:73
SYS_DEFINE_STATIC_INLINE sys_error_code_t IIODrvWrite(IIODriver *_this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel)
Definition IIODriver_vtbl.h:68
Definition IDriver_vtbl.h:49
Definition IIODriver_vtbl.h:42
Definition IIODriver_vtbl.h:56
const IIODriver_vtbl * vptr
Definition IIODriver_vtbl.h:60
uint16_t sys_error_code_t
Definition syserror.h:41
#define SYS_DEFINE_STATIC_INLINE
Definition systp.h:95