General_ConfigurationGENERAL_API

General configuration commands.

Data Structures

struct HiCapabilities_t
Capabilities offered by the WLAN used in command HiStartupIndBody_t .
struct HiOtpRegulSelModeInfo_t
REGUL_SEL_MODE OTP field reported in command HiStartupIndBody_t .
struct HiOtpPhyInfo_t
OTP_PHY_INFO OTP field reported in command HiStartupIndBody_t .
struct HiStartupIndBody_t
Startup Indication message.
struct HiConfigurationReqBody_t
Configure the device.
struct HiConfigurationCnfBody_t
Confirmation message of CONFIGURATION command HiConfigurationReqBody_t .
struct HiControlGpioReqBody_t
Send a request to read or write a gpio identified by its label (that is defined in the PDS)
struct HiControlGpioCnfBody_t
Confirmation from request to read and write a gpio.
struct HiRxStats_t
RX stats from the GENERIC indication message HiGenericIndBody_t .
struct HiGenericIndBody_t
the Generic indication message.
struct HiExceptionIndBody_t
Exception indication message.
struct HiErrorIndBody_t
Error indication message.

Typedefs

typedef HiMsgHdr_t HiShutDownReq_t
SHUT_DOWN command.

Enumerations

enum HiGpioMode {
HI_GPIO_MODE_D0 = 0x0,
HI_GPIO_MODE_D1 = 0x1,
HI_GPIO_MODE_OD0 = 0x2,
HI_GPIO_MODE_OD1 = 0x3,
HI_GPIO_MODE_TRISTATE = 0x4,
HI_GPIO_MODE_TOGGLE = 0x5,
HI_GPIO_MODE_READ = 0x6
}
Configure GPIO mode.
enum HiGpioError {
HI_GPIO_ERROR_0 = 0x0,
HI_GPIO_ERROR_1 = 0x1,
HI_GPIO_ERROR_2 = 0x2
}
detailed error cause returned by CONTROL_GPIO confirmation message HiControlGpioCnfBody_t
enum HiGenericIndicationType {
HI_GENERIC_INDICATION_TYPE_RAW = 0x0,
HI_GENERIC_INDICATION_TYPE_STRING = 0x1,
HI_GENERIC_INDICATION_TYPE_RX_STATS = 0x2
}
specifies the type of data reported by the indication message HiGenericIndBody_t
enum WsmHiError {
WSM_HI_ERROR_FIRMWARE_ROLLBACK = 0x0,
WSM_HI_ERROR_FIRMWARE_DEBUG_ENABLED = 0x1,
WSM_HI_ERROR_OUTDATED_SESSION_KEY = 0x2,
WSM_HI_ERROR_INVALID_SESSION_KEY = 0x3,
WSM_HI_ERROR_OOR_VOLTAGE = 0x4,
WSM_HI_ERROR_PDS_VERSION = 0x5
}
specifies the type of error reported by the indication message HiErrorIndBody_t

Detailed Description

General configuration commands.


Data Structure Documentation

HiCapabilities_t

struct HiCapabilities_t

Capabilities offered by the WLAN used in command HiStartupIndBody_t .

Definition at line 253 of file general_api.h .

Data Fields
uint8_t LinkMode: 2 Bit 0-1 : reg OTPCTRL_FB_STATUS_fb_secure_link_mode.
uint8_t Reserved: 6 Bit 2-7 : Reserved.
uint8_t Reserved2 Bit 8-15 : Reserved.
uint8_t Reserved3 Bit 16-23 : Reserved.
uint8_t Reserved4 Bit 24-31 : Reserved.

HiOtpRegulSelModeInfo_t

struct HiOtpRegulSelModeInfo_t

REGUL_SEL_MODE OTP field reported in command HiStartupIndBody_t .

Definition at line 264 of file general_api.h .

Data Fields
uint8_t RegionSelMode:4 Bit 0-3 : indicates default FW behavior regarding DFS region setting.
uint8_t Reserved:4 Bit 4-7 : Reserved.

HiOtpPhyInfo_t

struct HiOtpPhyInfo_t

OTP_PHY_INFO OTP field reported in command HiStartupIndBody_t .

Definition at line 272 of file general_api.h .

Data Fields
uint8_t OtpPhyVer:2 Bit 6-7 : Revision of OTP info.
uint8_t Phy0Region:3 Bit 3-5 : DFS region corresponding to backoff vs. channel group table indexed 1.
uint8_t Phy1Region:3 Bit 0-2 : DFS region corresponding to backoff vs. channel group table indexed 0.

HiStartupIndBody_t

struct HiStartupIndBody_t

Startup Indication message.

This is the first message sent to the host to confirm boot success. It gives detailed information on the HW and FW versions and capabilities

Definition at line 287 of file general_api.h .

Data Fields
uint8_t ApiVersionMajor
uint8_t ApiVersionMinor
HiCapabilities_t Capabilities
uint8_t DisabledChannelList[2] =OTP Disabled channel list info
uint8_t FirmwareBuild
uint8_t FirmwareLabel[128] Null terminated text string describing the loaded FW.
uint8_t FirmwareMajor
uint8_t FirmwareMinor
uint8_t FirmwareType See enum ::HiFwType.
uint16_t HardwareId =RO misc_read_reg7 register value
uint8_t MacAddr0[6] 1st MAC address derived from OTP
uint8_t MacAddr1[6] 2d MAC address derived from OTP
uint16_t NumInpChBufs Number of buffers available for request messages.
uint8_t NumInterfaces number of interfaces (WIFI link : STA or AP) that can be created by the user
uint8_t NumLinksAP number of STA that are supported in AP mode
uint8_t OPN[14] =OTP part_OPN
HiOtpPhyInfo_t OtpPhyInfo
HiOtpRegulSelModeInfo_t RegulSelModeInfo
uint16_t SizeInpChBuf Tx Buffer size in bytes=request message max size.
uint32_t Status Initialization status. A value of zero indicates the boot is completed successfully (see enum HiStatus )
uint32_t SupportedRateMask A bit mask that indicates which rates are supported by the Physical layer. See enum ::WsmTransmitRate.
uint8_t UID[8] =OTP UID

HiConfigurationReqBody_t

struct HiConfigurationReqBody_t

Configure the device.

It sends a PDS compressed file that configures the device regarding board dependent parameters. The PDS compressed file must fit in a command buffer and have less than 256 elements.

Definition at line 325 of file general_api.h .

Data Fields
uint16_t Length PdsData length in bytes.
uint8_t PdsData[1] variable size PDS data byte array

HiConfigurationCnfBody_t

struct HiConfigurationCnfBody_t

Confirmation message of CONFIGURATION command HiConfigurationReqBody_t .

Definition at line 337 of file general_api.h .

Data Fields
uint32_t Status Configuration status. A value of zero indicates the boot is completed successfully (see enum HiStatus )

HiControlGpioReqBody_t

struct HiControlGpioReqBody_t

Send a request to read or write a gpio identified by its label (that is defined in the PDS)

After a write it also read back the value to check there is no drive conflict

Definition at line 364 of file general_api.h .

Data Fields
uint8_t GpioLabel Identify the gpio by its label (defined in the PDS)
uint8_t GpioMode define how to set or read the gpio (see enum HiGpioMode )

HiControlGpioCnfBody_t

struct HiControlGpioCnfBody_t

Confirmation from request to read and write a gpio.

Definition at line 385 of file general_api.h .

Data Fields
uint32_t Status enum HiStatus : a value of zero indicates the request is completed successfully.
uint32_t Value the error detail (see enum HiGpioError ) when HiControlGpioCnfBody_t::Status reports an error else the gpio read value.

HiRxStats_t

struct HiRxStats_t

RX stats from the GENERIC indication message HiGenericIndBody_t .

Definition at line 422 of file general_api.h .

Data Fields
int16_t Cfo[22] CFO in kHz by frame rate.
uint32_t Date This message transmission date in firmware timebase (microsecond)
uint8_t IsExtPwrClk Indicate if the low power clock is external.
uint32_t NbCrcFrame Number of frame received with bad CRC.
uint32_t NbRxByRate[22] Number of frame received by rate.
uint32_t NbRxFrame Total number of frame received.
uint16_t Per[22] PER*10000 by frame rate.
uint32_t PerTotal PER on the total number of frame.
uint32_t PwrClkFreq Frequency of the low power clock in Hz.
int16_t Rssi[22] RSSI in Dbm*100 by frame rate.
int16_t Snr[22] SNR in Db*100 by frame rate.
uint32_t Throughput Throughput calculated on correct frames received.

HiGenericIndBody_t

struct HiGenericIndBody_t

the Generic indication message.

It reports different type of information that can be printed by the driver.

Definition at line 449 of file general_api.h .

Data Fields
HiIndicationData_t IndicationData Indication data.
uint32_t IndicationType Identify the indication data (see enum type HiGenericIndicationType )

HiExceptionIndBody_t

struct HiExceptionIndBody_t

Exception indication message.

It reports unexpected errors. A reboot is needed after this message.

Definition at line 465 of file general_api.h .

Data Fields
uint8_t Data[124] Raw data array.

HiErrorIndBody_t

struct HiErrorIndBody_t

Error indication message.

It reports user configuration errors. A reboot is needed after this message.

Definition at line 496 of file general_api.h .

Data Fields
uint8_t Data[124] Generic data buffer - contents depends on the error type.
uint32_t Type error type, see enum WsmHiError

Typedef Documentation

HiShutDownReq_t

SHUT_DOWN command.

A hardware reset and complete reboot is required to resume from that state. There is no confirmation to this command. It is effective when WUP register bit and WUP pin (when used) are both to 0.

Definition at line 401 of file general_api.h .

Enumeration Type Documentation

HiGenericIndicationType

specifies the type of data reported by the indication message HiGenericIndBody_t

Enumerator
HI_GENERIC_INDICATION_TYPE_RAW

Byte stream type, currently not used.

HI_GENERIC_INDICATION_TYPE_STRING

NULL terminating String.

HI_GENERIC_INDICATION_TYPE_RX_STATS

Rx statistics structure.

Definition at line 408 of file general_api.h .

HiGpioError

detailed error cause returned by CONTROL_GPIO confirmation message HiControlGpioCnfBody_t

Enumerator
HI_GPIO_ERROR_0

Undefined GPIO_ID.

HI_GPIO_ERROR_1

GPIO_ID not configured in gpio mode (gpio_enabled =0)

HI_GPIO_ERROR_2

Toggle not possible while in tristate.

Definition at line 377 of file general_api.h .

HiGpioMode

Configure GPIO mode.

Used in HiControlGpioReqBody_t

Enumerator
HI_GPIO_MODE_D0

Configure the GPIO to drive 0.

HI_GPIO_MODE_D1

Configure the GPIO to drive 1.

HI_GPIO_MODE_OD0

Configure the GPIO to open drain with pull_down to 0.

HI_GPIO_MODE_OD1

Configure the GPIO to open drain with pull_up to 1.

HI_GPIO_MODE_TRISTATE

Configure the GPIO to tristate.

HI_GPIO_MODE_TOGGLE

Toggle the GPIO output value : switches between D0 and D1 or between OD0 and OD1.

HI_GPIO_MODE_READ

Read the level at the GPIO pin.

Definition at line 350 of file general_api.h .

WsmHiError

specifies the type of error reported by the indication message HiErrorIndBody_t

Enumerator
WSM_HI_ERROR_FIRMWARE_ROLLBACK

Firmware rollback error, no data returned.

WSM_HI_ERROR_FIRMWARE_DEBUG_ENABLED

Firmware debug feature enabled, no data returned.

WSM_HI_ERROR_OUTDATED_SESSION_KEY

SecureLink Session key is outdated.

WSM_HI_ERROR_INVALID_SESSION_KEY

SecureLink Session key is invalid,.

WSM_HI_ERROR_OOR_VOLTAGE

Out-of-range power supply voltage detected.

WSM_HI_ERROR_PDS_VERSION

wrong PDS version detected, no data returned

Definition at line 480 of file general_api.h .