WNIC HAL

The WNIC HAL definitions is in dev_wnic.h, it provide interfaces for gpio driver to implement. Here is a diagram for the gpio interface.

WNIC HAL

Definitions

group DEVICE_HAL_WNIC_DEVSTRUCT

contains definitions of wnic device structure.

this structure will be used in user implemented code, which was called Device Driver Implement Layer for wnic to realize in user code.

Defines

WNIC_SET_ON_INIT_SUCCESS(wnic_ptr, on_ops)

WNIC SET ON OPERATIONS.

WNIC_SET_ON_INIT_FAIL(wnic_ptr, on_ops)
WNIC_SET_ON_CONNECTED(wnic_ptr, on_ops)
WNIC_SET_ON_DISCONNECTED(wnic_ptr, on_ops)
WNIC_SET_ON_MAC_UPDATED(wnic_ptr, on_ops)
WNIC_SET_ON_SCAN_FINISHED(wnic_ptr, on_ops)
WNIC_SET_ON_RXDATA_COMES(wnic_ptr, on_ops)
WNIC_SET_ON_DEV_ASSERTED(wnic_ptr, on_ops)

Typedefs

typedef struct dev_wnic DEV_WNIC
typedef struct dev_wnic *DEV_WNIC_PTR
typedef int32_t (*ON_WNIC_OPS)(DEV_WNIC *wnic_ptr)
typedef struct dev_wnic_on_ops DEV_WNIC_ON_OPS

wnic on state operations such as init success, init failed hardware assert, connected, disconnected, mac updated, scan finished

typedef struct dev_wnic_on_ops *DEV_WNIC_ON_OPS_PTR
typedef struct dev_wnic_info DEV_WNIC_INFO

wnic information struct definition

informations about wnic open state, working state, frequence, working method

typedef struct dev_wnic_info *DEV_WNIC_INFO_PTR
struct dev_wnic_on_ops
#include <dev_wnic.h>

wnic on state operations such as init success, init failed hardware assert, connected, disconnected, mac updated, scan finished

struct dev_wnic_info
#include <dev_wnic.h>

wnic information struct definition

informations about wnic open state, working state, frequence, working method

struct dev_wnic
#include <dev_wnic.h>

wnic device interface definition

define wnic device interface, like wnic information structure, functions to get wnic info, open/close/control wnic, send/receive data by wnic

Note

all this details are implemented by user in user porting code