1.1.3.4.3 DRV_MEMORY_Tasks Function
C
void DRV_MEMORY_Tasks( SYS_MODULE_OBJ object );
Summary
Maintains the Memory driver's internal state machine.
Description
This routine maintains the driver's internal state machine.
Initial state is put to process Queue so that driver can accept transfer requests(open, erase, read, write, etc) from client.
This routine is also responsible for checking the status of Erase, Write and read transfer requests and notify the client through transferHandler registered if any.
The state of driver will be busy until transfer is completed. Once transfer is done the state goes back to Process sate until new requests is received.
Preconditions
The DRV_MEMORY_Initialize routine must have been called for the specified Memory driver instance.
Parameters
Param | Description |
---|---|
object | Driver object handle, returned from the DRV_MEMORY_Initialize routine |
Returns
None.
Example
SYS_MODULE_OBJ object; // Returned from DRV_MEMORY_Initialize void SYS_Tasks ( void ) { DRV_Memory_Tasks (object); // Do other tasks }
Remarks
This routine is generated only in Asynchronous mode. This routine should not be called directly by application.
For Bare Metal it will be called by the system Task routine (SYS_Tasks)
For RTOS a separate Thread will be created for this task and will be called in the thread context.