PM5358
Application Programming Interface
4APPLICATION PROGRAMMING INTERFACE
This section provides a detailed description of each function that is a member of the
The API functions typically execute in the context of an application task.
Note: These functions are not
4.1Module Management
The module management is a set of API functions that are used by the application to open, start, stop and close the driver module. These functions will take care of initializing the driver, allocating memory and all RTOS resources needed by the driver. They are also used to change the module state. For more information on the module states see the state diagram on page 19. For a typical module management flow diagram see page 21.
Opening the Driver Module: suni4x622ModuleOpen
This function performs module level initialization of the device driver. This involves allocating all of the memory needed by the driver and initializing the internal structures.
Prototype
Inputs
Outputs
Returns
Valid States Side Effects
INT4 suni4x622ModuleOpen(sSUNI4x622_MIV *pmiv)
pmiv | : (pointer to) Module Initialization Vector |
Places the address of the MDB into the MIV passed by the application
Success = SUNI4x622_SUCCESS
Failure = SUNI4x622_ERR_INVALID_MODULE_STATE
SUNI4x622_ERR_INVALID_MIV
SUNI4x622_ERR_MEM_ALLOC
SUNI4x622_MOD_START
Changes the MODULE state to SUNI4x622_MOD_IDLE
Closing the Driver Module: suni4x622ModuleClose
This function performs module level shutdown of the driver. This involves deleting all devices being controlled by the driver (by calling suni4x622Delete for each device) and
Prototype | INT4 suni4x622ModuleClose(void) |
Proprietary and Confidential to | 52 |
Document ID: |
|