1.1.1 System Interface
The system interface provides APIs for initializing and maintaining the core WINCS02 driver as well as monitoring its status.
Driver Initialization
Harmony will initialize the WINCS02 driver by calling WDRV_WINC_Initialize with a WDRV_WINC_SYS_INIT structure populated by MCC.
WDRV_WINC_SYS_INIT consists of configuration for:
SPI - A pointer to a
WDRV_WINC_SPI_CFGstructure which will be passed toWDRV_WINC_SPIInitialize.Interrupts - The interrupt source which will be passed to
WDRV_WINC_INTInitialize.
Driver status can be monitored by the application by calling WDRV_WINC_Status. This function will return the following values indicating driver status.
| Status | Meaning |
|---|---|
| SYS_STATUS_ERROR | An error occurred. |
| SYS_STATUS_UNINITIALIZED | The driver has not been initialized. |
| SYS_STATUS_BUSY | The driver is initializing. |
| SYS_STATUS_READY | The driver and WINS02 have finished initializing. |
Driver System Task
The driver main system task is called periodically by Harmony. The function WDRV_WINC_Tasks updates and maintains the driver state.
Driver Interrupt
The WINCS02 device uses an interrupt request GPIO to signal when it requires attention. Upon assertion of this interrupt signal the system must call WDRV_WINC_ISR to allow the WINCS02 driver to service the signal.
Driver System Event Callback
Status events are provided by the driver through the System Event Callback. This callback is registered by calling WDRV_WINC_RegisterSystemEventCallback with a suitable WDRV_WINC_SYSTEM_EVENT_CALLBACK type callback function.
System events are listed in WDRV_WINC_SYSTEM_EVENT_TYPE.
