1.1.4.15 WDRV_WINC_CTRLDCPT

Struct type

Summary

Driver descriptor for the WINC Control driver.

Description

Structure containing the system level descriptor for the WINC driver. This structure is initialized by a call to WDRV_WINC_Initialize.

Remarks

None.

typedef struct
{
    /* Primary driver handle. */
    DRV_HANDLE handle;

    /* Extended system status which can be queried via WDRV_WINC_StatusExt. */
    WDRV_WINC_SYS_STATUS extSysStat;

    /* WINC device handle. */
    WINC_DEVICE_HANDLE wincDevHandle;

    /* Current state of WINC device SDIO. */
    WINC_SDIO_STATE_TYPE wincSDIOState;

    /* Flag indicating if WINC device was hard reset. */
    bool wincHardReset;

    /* WINC device receive buffer pointer. */
    void *pWINCDevReceiveBuffer;

    /* Timeout counter for WINC device SDIO reset. */
    uint8_t wincSDIOResetTimeoutCount;

    /* Interrupt source. */
    int intSrc;

    /* Delay timer handle. */
    SYS_TIME_HANDLE delayTimer;

    /* Firmware version information. */
    WDRV_WINC_FIRMWARE_VERSION_INFO fwVersion;

    /* Device information. */
    WDRV_WINC_DEVICE_INFO devInfo;

    /* Flag indicating if this instance is operating as s station or soft-AP. */
    bool isAP;

    /* Variable to store the state of the connection. */
    WDRV_WINC_CONN_STATE connectedState;

    /* Flag indicating if a BSS scan is currently in progress. */
    bool scanInProgress;

    /* Current index of the BSS scan results. */
    uint8_t scanIndex;

    /* Flag indicating if the scan parameters have been modified. */
    bool scanParamDefault;

    /* Number of available reg-domains. */
    uint8_t availRegDomNum;

    /* Currently active reg-domain. */
    WDRV_WINC_REGDOMAIN_INFO activeRegDomain;

    /* The number of scan slots per channel. */
    uint8_t scanNumSlots;

    /* Number of probe requests to be sent each scan slot. */
    uint8_t scanNumProbes;

    /* Time spent on each active channel probing for BSS's. */
    uint16_t scanActiveScanTime;

    /* Time spent on each passive channel listening for beacons. */
    uint16_t scanPassiveListenTime;

    /* Main event semaphore. */
    OSAL_SEM_HANDLE_TYPE drvEventSemaphore;

    /* Bitmap of enabled 2.4GHz channels for scanning. */
    WDRV_WINC_CHANNEL24_MASK scanChannelMask24;

    /* Current operating channel. */
    WDRV_WINC_CHANNEL_ID opChannel;

    /* Association information (STA). */
    WDRV_WINC_ASSOC_INFO assocInfoSTA;

    /* Association information (AP). */
    WDRV_WINC_ASSOC_INFO assocInfoAP[WDRV_WINC_NUM_ASSOCS];

    /* TLS context information */
    WDRV_WINC_TLSCTX_INFO tlscInfo[WDRV_WINC_TLS_CTX_NUM];

    struct
    {
        /* TLS cipher suite information */
        WDRV_WINC_TLSCSCTX_INFO tlsCsInfo[WDRV_WINC_TLS_CIPHER_SUITE_NUM];

        /* Number of cipher suites returned. */
        uint8_t numAlgorithms;

        /* List of cipher suites returned. */
        uint16_t algorithms[WINC_CFG_PARAM_ID_TLS_CSL_CIPHER_SUITES_NUM];

        /* Callback to use for getting TLS cipher suite configurations. */
        WDRV_WINC_TLS_CS_CALLBACK pfTlsCsResponseCB;
    } tlsCipherSuites;

    /* File operation contexts */


    WDRV_WINC_FILE_CTX fileCtx[WDRV_WINC_FILE_CTX_NUM];

    union
    {
        /* File find callback. */
        WDRV_WINC_FILE_FIND_CALLBACK pfFileFindCB;

        /* File delete callback */
        WDRV_WINC_FILE_DELETE_CALLBACK pfFileDeleteCB;
    };


    /* File operation user context for callbacks */

    uintptr_t fileOpUserCtx;

    union
    {
        struct
        {
        uint8_t confValid : 1;
        uint8_t enabled : 1;
        uint8_t use2Wire : 1;
        uint8_t wlanRxHigherThanBt : 1;
        uint8_t wlanTxHigherThanBt : 1;
        uint8_t sharedAntenna : 1;
        };
        uint8_t flags;
    } coex;

    struct
    {

        /* MQTT connection status callback. */
        WDRV_WINC_MQTT_CONN_STATUS_CALLBACK pfConnCB;

        /* MQTT connection state. */
        WDRV_WINC_MQTT_CONN_STATUS_TYPE connState;


        /* User context for MQTT connection status callback. */
        uintptr_t connCbCtx;

        WDRV_WINC_MQTT_PUB_STATUS_CALLBACK pfPubStatusCb;

        uintptr_t pubStatusCbCtx;

        WDRV_WINC_MQTT_SUBSCRIBE_CALLBACK pfSubscribeCb;

        uintptr_t subscribeCbCtx;

        uint8_t connAckFlags;

        uint8_t connAckResult;
    } mqtt;


    /* Callback to use for BSS find operations. */

    WDRV_WINC_BSSFIND_NOTIFY_CALLBACK pfBSSFindNotifyCB;


    /* Callback to use for notifying changes in connection state. */

    WDRV_WINC_BSSCON_NOTIFY_CALLBACK pfConnectNotifyCB;


    /* Callback to use for events relating to the WINC system time. */

    WDRV_WINC_SYSTIME_CURRENT_CALLBACK pfSystemTimeGetCurrentCB;


    /* Callback to use for retrieving association RSSI information from the WINC. */

    WDRV_WINC_ASSOC_RSSI_CALLBACK pfAssociationRSSICB;


    /* Callback to use for ICHO echo responses. */

    WDRV_WINC_ICMP_ECHO_RSP_EVENT_HANDLER pfICMPEchoResponseCB;


    /* Callback to use for DNS resolve responses. */

    WDRV_WINC_DNS_RESOLVE_CALLBACK pfDNSResolveResponseCB;


    /* Callback to use for network interface events. */

    WDRV_WINC_NETIF_EVENT_HANDLER pfNetIfEventCB;


    /* Callback to use for network interface information requests. */

    WDRV_WINC_NETIF_INFO_HANDLER pfNetIfInfoCB;


    /* Callback to use for regulatory domain information events. */

    WDRV_WINC_REGDOMAIN_CALLBACK pfRegDomainEventCB;


    /* Callback to use for receiving powersave information events. */

    WDRV_WINC_POWERSAVE_CALLBACK pfPowersaveEventCB;


    /* Callback to use for receiving DHCP server events. */

    WDRV_WINC_DHCPS_EVENT_HANDLER pfDHCPSEventCB;

    WDRV_WINC_NETIF_IDX netIfSTA;

    WDRV_WINC_NETIF_IDX netIfAP;
} WDRV_WINC_CTRLDCPT;