ODeV framework  v2
Data Structures | Functions
IDriverVtbl.h File Reference

Private API for the Driver Interface. More...

#include "systypes.h"
#include "syserror.h"
#include "systp.h"
+ Include dependency graph for IDriverVtbl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _IDriver
 

Functions

SYS_DEFINE_INLINE sys_error_code_t IDrvInit (IDriver *this, void *pParams)
 
SYS_DEFINE_INLINE sys_error_code_t IDrvStart (IDriver *this)
 
SYS_DEFINE_INLINE sys_error_code_t IDrvStop (IDriver *this)
 
SYS_DEFINE_INLINE sys_error_code_t IDrvDoEnterPowerMode (IDriver *this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode)
 
SYS_DEFINE_INLINE sys_error_code_t IDrvWrite (IDriver *this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel)
 
SYS_DEFINE_INLINE sys_error_code_t IDrvRead (IDriver *this, uint8_t *pDataBuffer, uint16_t nDataSize, uint16_t nChannel)
 

Detailed Description

Private API for the Driver Interface.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
1.2.0
Date
Sep 7, 2016 This header file must be included included in all source files that use the IDriver public API.
Attention

© COPYRIGHT 2016 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ IDrvDoEnterPowerMode()

SYS_DEFINE_INLINE sys_error_code_t IDrvDoEnterPowerMode ( IDriver this,
const EPowerMode  eActivePowerMode,
const EPowerMode  eNewPowerMode 
)
inline

This function is called by the framework when the system changing the power mode.

Parameters
this[IN] specifies a pointer to a IDriver object.
eActivePowerMode[IN] specifies the actual power mode.
eNewPowerMode[IN] specifies the new power mode.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ IDrvInit()

SYS_DEFINE_INLINE sys_error_code_t IDrvInit ( IDriver this,
void *  pParams 
)
inline

Initialize the driver. This method should be used by a task object during the hardware initialization process.

Parameters
this[IN] specifies a pointer to a IDriver object.
pParamsspecifies a pointer to a subclass defined initialization parameters.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ IDrvRead()

SYS_DEFINE_INLINE sys_error_code_t IDrvRead ( IDriver this,
uint8_t *  pDataBuffer,
uint16_t  nDataSize,
uint16_t  nChannel 
)
inline
Parameters
this[IN] specifies a pointer to a IDriver object.
pDataBuffer
nDataSize
nChannel
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ IDrvStart()

SYS_DEFINE_INLINE sys_error_code_t IDrvStart ( IDriver this)
inline
Parameters
thiss[IN] specifies a pointer to a IDriver object.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ IDrvStop()

SYS_DEFINE_INLINE sys_error_code_t IDrvStop ( IDriver this)
inline
Parameters
this[IN] specifies a pointer to a IDriver object.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ IDrvWrite()

SYS_DEFINE_INLINE sys_error_code_t IDrvWrite ( IDriver this,
uint8_t *  pDataBuffer,
uint16_t  nDataSize,
uint16_t  nChannel 
)
inline
Parameters
this[IN] specifies a pointer to a IDriver object.
pDataBuffer[IN] specifies the buffer used to store the received data.
nDataSize[IN] specified the size in byte of the buffer.
nChannel[IN] not used by
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.