ODeV framework  v2
Typedefs | Functions
IDriver.h File Reference

Public API for the Driver Interface. More...

#include "syslowpower.h"
+ Include dependency graph for IDriver.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _IDriver IDriver
 

Functions

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

Detailed Description

Public API for the Driver Interface.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
1.2.0
Date
Sep 6, 2016

IDriver is the base interface for the Driver subsystem. Each driver implements this interface.

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.

Typedef Documentation

◆ IDriver

typedef struct _IDriver IDriver

Creates a type name for _IDriver.

Function Documentation

◆ IDrvDoEnterPowerMode()

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_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_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_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_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_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.