Wifiiot

Overview

Provides dedicated device operation interfaces on the Wi-Fi module, including ADC, AT, flash, GPIO, I2C, I2S, partition, PWM, SDIO, UART, and watchdog.

Since:

1.0

Version:

1.0

Summary

Files

File Name

Description

wifiiot_adc.h

Declares the ADC interface functions for you to read data.

wifiiot_at.h

Declares the AT interface functions.

wifiiot_errno.h

Defines error codes used by the Wi-Fi module.

wifiiot_flash.h

Declares the flash interface functions.

wifiiot_flash_ex.h

Declares the extended flash interface functions for obtaining flash information.

wifiiot_gpio.h

Declares the GPIO interface functions.

wifiiot_gpio_ex.h

Declares the extended GPIO interface functions.

wifiiot_i2c.h

Declares the I2C interface functions.

wifiiot_i2c_ex.h

Declares the extended I2C interface functions.

wifiiot_i2s.h

Declares the I2S interface functions.

wifiiot_kal.h

Declares the KAL interface functions.

wifiiot_partition.h

Declares the partition interface functions.

wifiiot_pwm.h

Declares the PWM interface functions.

wifiiot_sdio.h

Declares the SDIO interface functions.

wifiiot_spi.h

Declares the SPI interface functions.

wifiiot_uart.h

Declares the UART interface functions.

wifiiot_uart_ex.h

Declares the extended UART interface functions.

wifiiot_watchdog.h

Declares the watchdog interface functions.

Data Structures

Data Structure Name

Description

AtCmdTbl

Defines the AT command registration structure.

WifiIotI2cData

Defines I2C data transmission attributes.

WifiIotI2cFunc

Defines I2C callbacks.

WifiIotI2sAttribute

Defines I2S attributes.

WifiIotFlashPartitionInfo

Describes an entry in a flash partition table.

WifiIotFlashPartitionTable

Describes a flash partition table.

WifiIotSdioExtendFunc

Provides extended SDIO attributes.

WifiIotSdioAdmatable

Defines attributes of an SDIO ADMA table.

WifiIotSdioIntcallback

SDIO interrupt callback structure.

WifiIotSpiCfgBasicInfo

Defines data communication parameters.

WifiIotSpiCfgInitParam

Specifies whether a device is a master or slave device.

WifiIotUartAttribute

Defines the basic attributes of a UART device.

WifiIotUartExtraAttr

Defines the extended attributes of a UART device.

Macros

Macro Name and Value

Description

WIFI_IOT_SUCCESS   0

Defines a module-level return value to indicate a successful operation.

WIFI_IOT_FAILURE   (-1)

Defines a module-level return value to indicate an operation failure.

WIFI_IOT_ERR_UART_INVALID_PARAMETER   0x80001000

Defines a UART error code to indicate an invalid parameter.

WIFI_IOT_ERR_UART_INVALID_SUSPEND   0x80001001

Defines a UART error code to indicate an invalid pause operation.

WIFI_IOT_ERR_UART_INVALID_PARITY   0x80001002

Defines a UART error code to indicate an invalid parity check.

WIFI_IOT_ERR_UART_INVALID_DATA_BITS   0x80001003

Defines a UART error code to indicate an invalid data bit.

WIFI_IOT_ERR_UART_INVALID_STOP_BITS   0x80001004

Defines a UART error code to indicate an invalid stop bit.

WIFI_IOT_ERR_UART_INVALID_BAUD   0x80001005

Defines a UART error code to indicate an invalid baud rate.

WIFI_IOT_ERR_UART_INVALID_COM_PORT   0x80001006

Defines a UART error code to indicate an invalid port number.

WIFI_IOT_ERR_UART_NOT_SUPPORT_DMA   0x80001007

Defines a UART error code to indicate a non-support for DMA.

WIFI_IOT_ERR_UART_NOT_BLOCK_MODE   0x80001008

Defines a UART error code to indicate the non-block mode.

WIFI_IOT_ERR_GPIO_INVALID_PARAMETER   0x80001040

Defines a GPIO error code to indicate an invalid parameter.

WIFI_IOT_ERR_GPIO_REPEAT_INIT   0x80001041

Defines a GPIO error code to indicate repeated initialization.

WIFI_IOT_ERR_GPIO_NOT_INIT   0x80001042

Defines a GPIO error code to indicate non-initialization.

WIFI_IOT_ERR_GPIO_NOT_SUPPORT   0x80001043

Defines a GPIO error code to indicate a non-support.

WIFI_IOT_ERR_FLASH_NOT_INIT   0x800010C0

Defines a flash error code to indicate non-initialization.

WIFI_IOT_ERR_FLASH_INVALID_PARAM   0x800010C1

Defines a flash error code to indicate an invalid parameter.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR   0x800010C2

Defines a flash error code to indicate that the address is out of range.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_SIZE_ZERO   0x800010C3

Defines a flash error code to indicate that the parameter size is 0

WIFI_IOT_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN   0x800010C4

Defines a flash error code to indicate that the erase size is not aligned.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL   0x800010C5

Defines a flash error code to indicate that the data of the I/O controller is empty.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_DATA_NULL   0x800010C6

Defines a flash error code to indicate empty data.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD1   0x800010C7

Defines a flash error code to indicate that pad1 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD2   0x800010C8

Defines a flash error code to indicate that pad2 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD3   0x800010C9

Defines a flash error code to indicate that pad3 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD4   0x800010CA

Defines a flash error code to indicate that pad4 is incorrect.

WIFI_IOT_ERR_FLASH_TIME_OUT_WAIT_READY   0x800010CB

Defines a flash error code to indicate a timeout on waiting for ready.

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG1   0x800010CC

Defines a flash error code to indicate that an error occurs when reading register 1.

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG2   0x800010CD

Defines a flash error code to indicate that an error occurs when reading register 2.

WIFI_IOT_ERR_FLASH_QUAD_MODE_COMPARE_REG   0x800010CE

Defines a flash error code to indicate that an error occurs when comparing registers.

WIFI_IOT_ERR_FLASH_NO_MATCH_FLASH   0x800010CF

Defines a flash error code to indicate a flash mismatch.

WIFI_IOT_ERR_FLASH_WRITE_ENABLE   0x800010D0

Defines a flash error code to indicate a failure in enabling write.

WIFI_IOT_ERR_FLASH_NO_MATCH_ERASE_SIZE   0x800010D1

Defines a flash error code to indicate a mismatch in the size of data to erase.

WIFI_IOT_ERR_FLASH_MAX_SPI_OP   0x800010D2

Defines a flash error code to indicate the maximum value of the SPI operation.

WIFI_IOT_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID   0x800010D3

Defines a flash error code to indicate an unsupported IO controller ID..

WIFI_IOT_ERR_FLASH_INVALID_CHIP_ID   0x800010D4

Defines a flash error code to indicate an invalid chip ID.

WIFI_IOT_ERR_FLASH_RE_INIT   0x800010D5

Defines a flash error code to indicate repeated initialization.

WIFI_IOT_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE   0x800010D6

Defines a flash error code to indicate a non-support for data erasure.

WIFI_IOT_ERR_FLASH_WRITE_COMPARE_WRONG   0x800010D7

Defines a flash error code to indicate that an error occurs when comparing the data written.

WIFI_IOT_ERR_FLASH_WAIT_CFG_START_TIME_OUT   0x800010D8

Defines a flash error code to indicate a timeout on waiting for a configuration to start.

WIFI_IOT_ERR_FLASH_PATITION_INIT_FAIL   0x800010D9

Defines a flash error code to indicate a partition initialization failure.

WIFI_IOT_ERR_FLASH_INITILIZATION   0x800010DA

Defines a flash error code to indicate initialization.

WIFI_IOT_ERR_FLASH_ERASE_NOT_4K_ALIGN   0x800010DB

Defines a flash error code to indicate that the size of data to erase is not a multiple of 4K bytes.

WIFI_IOT_ERR_FLASH_PROTECT_NOT_SUPPORT   0x800010DC

Defines a flash error code to indicate a non-support.

WIFI_IOT_ERR_FLASH_PROTECT_NOT_INIT   0x800010DD

Defines a flash error code to indicate non-initialization.

WIFI_IOT_ERR_FLASH_PROTECT_RE_INIT   0x800010DE

Defines a flash error code to indicate repeated initialization.

WIFI_IOT_ERR_FLASH_PROTECT_NOT_FIND_CHIP   0x800010DF

Defines a flash error code to indicate that no chip is found.

WIFI_IOT_ERR_FLASH_CRYPTO_INVALID_PARAM   0x800010F0

Defines a flash error code to indicate an invalid parameter.

WIFI_IOT_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE   0x800010F1

Defines a flash error code to indicate that the address is out of range.

WIFI_IOT_ERR_FLASH_CRYPTO_MALLOC_FAIL   0x800001F2

Defines a flash error code to indicate a failure in applying for memory.

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR   0x800001F3

Defines a flash error code to indicate an encryption error.

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR   0x800001F4

Defines a flash error code to indicate a decryption error.

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR   0x800001F5

Defines a flash error code to indicate an empty key value.

WIFI_IOT_ERR_FLASH_CRYPTO_MEMCPY_FAIL   0x800001F6

Defines a flash error code to indicate a copy failure.

WIFI_IOT_ERR_FLASH_CRYPTO_NOT_SUPPORT   0x800001F7

Defines a flash error code to indicate a non-support for encryption.

WIFI_IOT_ERR_FLASH_CRYPTO_PREPARE_ERR   0x800001F8

Defines a flash error code to indicate an incorrect parameter during encryption.

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_INVALID_ERR   0x800001F9

Defines a flash error code to indicate an invalid key.

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_SAVE_ERR   0x800001FA

Defines a flash error code to indicate a failure in saving the key.

WIFI_IOT_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR   0x800001FB

Defines a flash error code to indicate an incorrect kernel address..

WIFI_IOT_ERR_I2C_NOT_INIT   0x80001180

Defines an I2C error code to indicate a non-support.

WIFI_IOT_ERR_I2C_INVALID_PARAMETER   0x80001181

Defines an I2C error code to indicate an invalid parameter.

WIFI_IOT_ERR_I2C_TIMEOUT_START   0x80001182

Defines an I2C error code to indicate a start timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_WAIT   0x80001183

Defines an I2C error code to indicate a wait timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_STOP   0x80001184

Defines an I2C error code to indicate a stop timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE   0x80001185

Defines an I2C error code to indicate a receive timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE_PROC   0x80001186

Defines an I2C error code to indicate a processing timeout.

WIFI_IOT_ERR_I2C_WAIT_SEM_FAIL   0x80001187

Defines an I2C error code to indicate a waiting failure.

WIFI_IOT_ERR_I2C_START_ACK_ERR   0x80001188

Defines an I2C error code to indicate a responding failure.

WIFI_IOT_ERR_I2C_WAIT_ACK_ERR   0x80001189

Defines an I2C error code to indicate a failure in waiting for a response.

WIFI_IOT_ERR_SPI_NOT_INIT   0x800011C0

Defines an SPI error code to indicate non-initialization.

WIFI_IOT_ERR_SPI_REINIT   0x800011C1

Defines an SPI error code to indicate repeated initialization.

WIFI_IOT_ERR_SPI_PARAMETER_WRONG   0x800011C2

Defines an SPI error code to indicate a parameter error.

WIFI_IOT_ERR_SPI_BUSY   0x800011C3

Defines an SPI error code to indicate the busy state.

WIFI_IOT_ERR_SPI_WRITE_TIMEOUT   0x800011C4

Defines an SPI error code to indicate a write timeout.

WIFI_IOT_ERR_SPI_READ_TIMEOUT   0x800011C5

Defines an SPI error code to indicate a read timeout.

WIFI_IOT_ERR_SPI_NOT_SUPPORT_DMA   0x800011C6

Defines an SPI error code to indicate a non-support for DMA.

WIFI_IOT_ERR_SDIO_INVALID_PARAMETER   0x80001280

Defines an SDIO error code to indicate an invalid parameter.

WIFI_IOT_ERR_ADC_PARAMETER_WRONG   0x80001300

Defines an ADC error code to indicate a parameter error.

WIFI_IOT_ERR_ADC_INVALID_CHANNEL_ID   0x80001301

Defines an ADC error code to indicate an invalid channel.

WIFI_IOT_ERR_ADC_TIMEOUT   0x80001302

Defines an ADC error code to indicate a timeout.

WIFI_IOT_ERR_ADC_NOT_INIT   0x80001303

Defines an ADC error code to indicate non-initialization.

WIFI_IOT_ERR_PWM_NO_INIT   0x80001340

Defines a PWM error code to indicate non-initialization.

WIFI_IOT_ERR_PWM_INITILIZATION_ALREADY   0x80001341

Defines a PWM error code to indicate an initialization error.

WIFI_IOT_ERR_PWM_INVALID_PARAMETER   0x80001342

Defines a PWM error code to indicate an invalid parameter.

WIFI_IOT_ERR_DMA_INVALID_PARA   0x80001380

Defines a DMA error code to indicate an invalid parameter.

WIFI_IOT_ERR_DMA_NOT_INIT   0x80001381

Defines a DMA error code to indicate non-initialization.

WIFI_IOT_ERR_DMA_BUSY   0x80001382

Defines a DMA error code to indicate the busy state.

WIFI_IOT_ERR_DMA_TRANSFER_FAIL   0x80001383

Defines a DMA error code to indicate a transmission failure.

WIFI_IOT_ERR_DMA_TRANSFER_TIMEOUT   0x80001384

Defines a DMA error code to indicate a transmission timeout.

WIFI_IOT_ERR_DMA_GET_NOTE_FAIL   0x80001385

Defines a DMA error code to indicate a retrieval failure.

WIFI_IOT_ERR_DMA_LLI_NOT_CREATE   0x80001386

Defines a DMA error code to indicate that the LLI is not created.

WIFI_IOT_ERR_DMA_CH_IRQ_ENABLE_FAIL   0x80001387

Defines a DMA error code to indicate a failure in enabling channel interrupt.

WIFI_IOT_ERR_I2S_INVALID_PARAMETER   0x80001400

Defines an I2S error code to indicate an invalid parameter.

WIFI_IOT_ERR_I2S_WRITE_TIMEOUT   0x80001401

Defines an I2S error code to indicate a write timeout.

WIFI_IOT_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED   0x80003280

Defines an AT error code to indicate repeated function registration.

WIFI_IOT_ERR_AT_INVALID_PARAMETER   0x80003281

Defines an AT error code to indicate an invalid parameter.

WIFI_IOT_FLASH_PARTITON_MAX    12

Indicates the maximum number of partition tables.

WIFI_IOT_SDIO_EXTENDREG_COUNT    64

Indicates the number of extended registers on an SDIO device.

Typedefs

Typedef Name

Description

GpioIsrCallbackFunc) (char arg)

typedef void( 

Indicates the GPIO interrupt callback.

I2CResetFunc) (void)

typedef void( 

Indicates the callback invoked when a device exception occurs.

I2cPrepareFunc) (void)

typedef void( 

Indicates the callback invoked for device preparation.

I2cRestoreFunc) (void)

typedef void( 

Indicates the callback invoked for device recovery.

TickIdleKalCallback) (void)

typedef void( 

Indicates the idle task and CPU tick callbacks.

NotifyHostMessageEvent ) (void)

typedef void( 

Indicates the callback invoked upon a message event on the host.

SpiIsrFunc ) (void)

typedef void( 

Indicates the SPI callback, which is used in SpiRegisterUsrFunc.

Enumerations

Enumeration Name

Description

WifiIotAdcChannelIndex {   WIFI_IOT_ADC_CHANNEL_0, WIFI_IOT_ADC_CHANNEL_1, WIFI_IOT_ADC_CHANNEL_2, WIFI_IOT_ADC_CHANNEL_3,   WIFI_IOT_ADC_CHANNEL_4, WIFI_IOT_ADC_CHANNEL_5, WIFI_IOT_ADC_CHANNEL_6, WIFI_IOT_ADC_CHANNEL_7,   WIFI_IOT_ADC_CHANNEL_BUTT }

Enumerates ADC channel indexes.

WifiIotAdcCurBais {   WIFI_IOT_ADC_CUR_BAIS_DEFAULT, WIFI_IOT_ADC_CUR_BAIS_AUTO, WIFI_IOT_ADC_CUR_BAIS_1P8V, WIFI_IOT_ADC_CUR_BAIS_3P3V,   WIFI_IOT_ADC_CUR_BAIS_BUTT }

Enumerates analog power control modes.

WifiIotAdcEquModelSel {   WIFI_IOT_ADC_EQU_MODEL_1, WIFI_IOT_ADC_EQU_MODEL_2, WIFI_IOT_ADC_EQU_MODEL_4, WIFI_IOT_ADC_EQU_MODEL_8,   WIFI_IOT_ADC_EQU_MODEL_BUTT }

Enumerates equation models.

WifiIotGpioIdx {   WIFI_IOT_GPIO_IDX_0, WIFI_IOT_GPIO_IDX_1, WIFI_IOT_GPIO_IDX_2, WIFI_IOT_GPIO_IDX_3,   WIFI_IOT_GPIO_IDX_4, WIFI_IOT_GPIO_IDX_5, WIFI_IOT_GPIO_IDX_6, WIFI_IOT_GPIO_IDX_7,   WIFI_IOT_GPIO_IDX_8, WIFI_IOT_GPIO_IDX_9, WIFI_IOT_GPIO_IDX_10, WIFI_IOT_GPIO_IDX_11,   WIFI_IOT_GPIO_IDX_12, WIFI_IOT_GPIO_IDX_13, WIFI_IOT_GPIO_IDX_14, WIFI_IOT_GPIO_IDX_MAX }

Enumerates GPIO pin IDs.

WifiIotGpioValue { WIFI_IOT_GPIO_VALUE0 = 0, WIFI_IOT_GPIO_VALUE1 }

Enumerates GPIO level values.

WifiIotGpioDir { WIFI_IOT_GPIO_DIR_IN = 0, WIFI_IOT_GPIO_DIR_OUT }

Enumerates GPIO directions.

WifiIotGpioIntType { WIFI_IOT_INT_TYPE_LEVEL = 0, WIFI_IOT_INT_TYPE_EDGE }

Enumerates GPIO interrupt trigger modes.

WifiIotGpioIntPolarity { WIFI_IOT_GPIO_EDGE_FALL_LEVEL_LOW = 0, WIFI_IOT_GPIO_EDGE_RISE_LEVEL_HIGH }

Enumerates I/O interrupt polarities.

WifiIotIoName {   WIFI_IOT_IO_NAME_GPIO_0, WIFI_IOT_IO_NAME_GPIO_1, WIFI_IOT_IO_NAME_GPIO_2, WIFI_IOT_IO_NAME_GPIO_3,   WIFI_IOT_IO_NAME_GPIO_4, WIFI_IOT_IO_NAME_GPIO_5, WIFI_IOT_IO_NAME_GPIO_6, WIFI_IOT_IO_NAME_GPIO_7,   WIFI_IOT_IO_NAME_GPIO_8, WIFI_IOT_IO_NAME_GPIO_9, WIFI_IOT_IO_NAME_GPIO_10, WIFI_IOT_IO_NAME_GPIO_11,   WIFI_IOT_IO_NAME_GPIO_12, WIFI_IOT_IO_NAME_GPIO_13, WIFI_IOT_IO_NAME_GPIO_14, WIFI_IOT_IO_NAME_MAX }

Enumerates GPIO hardware pin IDs.

WifiIotIoFuncGpio0 {   WIFI_IOT_IO_FUNC_GPIO_0_GPIO, WIFI_IOT_IO_FUNC_GPIO_0_UART1_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_0_SPI1_CK, WIFI_IOT_IO_FUNC_GPIO_0_JTAG_TDO,   WIFI_IOT_IO_FUNC_GPIO_0_PWM3_OUT, WIFI_IOT_IO_FUNC_GPIO_0_I2C1_SDA }

Enumerates the functions of GPIO hardware pin 0.

WifiiIotIoFuncGpio1 { WIFI_IOT_IO_FUNC_GPIO_1_GPIO }

Enumerates the functions of GPIO hardware pin 1.

WifiIotIoFuncGpio2 {   WIFI_IOT_IO_FUNC_GPIO_2_GPIO, WIFI_IOT_IO_FUNC_GPIO_2_UART1_RTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_2_SPI1_TXD, WIFI_IOT_IO_FUNC_GPIO_2_JTAG_TRSTN,   WIFI_IOT_IO_FUNC_GPIO_2_PWM2_OUT, WIFI_IOT_IO_FUNC_GPIO_2_SSI_CLK = 7 }

Enumerates the functions of GPIO hardware pin 2.

WifiIotIoFuncGpio3 {   WIFI_IOT_IO_FUNC_GPIO_3_GPIO, WIFI_IOT_IO_FUNC_GPIO_3_UART0_TXD, WIFI_IOT_IO_FUNC_GPIO_3_UART1_CTS_N, WIFI_IOT_IO_FUNC_GPIO_3_SPI1_CSN,   WIFI_IOT_IO_FUNC_GPIO_3_JTAG_TDI, WIFI_IOT_IO_FUNC_GPIO_3_PWM5_OUT, WIFI_IOT_IO_FUNC_GPIO_3_I2C1_SDA, WIFI_IOT_IO_FUNC_GPIO_3_SSI_DATA }

Enumerates the functions of GPIO hardware pin 3.

WifiIotIoFuncGpio4 {   WIFI_IOT_IO_FUNC_GPIO_4_GPIO, WIFI_IOT_IO_FUNC_GPIO_4_UART0_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_4_JTAG_TMS = 4, WIFI_IOT_IO_FUNC_GPIO_4_PWM1_OUT,   WIFI_IOT_IO_FUNC_GPIO_4_I2C1_SCL }

Enumerates the functions of GPIO hardware pin 4.

WifiIotIoFuncGpio5 {   WIFI_IOT_IO_FUNC_GPIO_5_GPIO, WIFI_IOT_IO_FUNC_GPIO_5_UART1_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_5_SPI0_CSN, WIFI_IOT_IO_FUNC_GPIO_5_PWM2_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_5_I2S0_MCLK, WIFI_IOT_IO_FUNC_GPIO_5_BT_STATUS }

Enumerates the functions of GPIO hardware pin 5.

WifiIotIoFuncGpio6 {   WIFI_IOT_IO_FUNC_GPIO_6_GPIO, WIFI_IOT_IO_FUNC_GPIO_6_UART1_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_6_SPI0_CK, WIFI_IOT_IO_FUNC_GPIO_6_PWM3_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_6_I2S0_TX, WIFI_IOT_IO_FUNC_GPIO_6_COEX_SWITCH }

Enumerates the functions of GPIO hardware pin 6.

WifiIotIoFuncGpio7 {   WIFI_IOT_IO_FUNC_GPIO_7_GPIO, WIFI_IOT_IO_FUNC_GPIO_7_UART1_CTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_7_SPI0_RXD, WIFI_IOT_IO_FUNC_GPIO_7_PWM0_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_7_I2S0_BCLK, WIFI_IOT_IO_FUNC_GPIO_7_BT_ACTIVE }

Enumerates the functions of GPIO hardware pin 7.

WifiIotIoFuncGpio8 {   WIFI_IOT_IO_FUNC_GPIO_8_GPIO, WIFI_IOT_IO_FUNC_GPIO_8_UART1_RTS_N = 2, WIFI_IOT_IO_FUNC_GPIO_8_SPI0_TXD, WIFI_IOT_IO_FUNC_GPIO_8_PWM1_OUT = 5,   WIFI_IOT_IO_FUNC_GPIO_8_I2S0_WS, WIFI_IOT_IO_FUNC_GPIO_8_WLAN_ACTIVE }

Enumerates the functions of GPIO hardware pin 8.

WifiIotIoFuncGpio9 {   WIFI_IOT_IO_FUNC_GPIO_9_GPIO, WIFI_IOT_IO_FUNC_GPIO_9_I2C0_SCL, WIFI_IOT_IO_FUNC_GPIO_9_UART2_RTS_N, WIFI_IOT_IO_FUNC_GPIO_9_SDIO_D2,   WIFI_IOT_IO_FUNC_GPIO_9_SPI0_TXD, WIFI_IOT_IO_FUNC_GPIO_9_PWM0_OUT, WIFI_IOT_IO_FUNC_GPIO_9_I2S0_MCLK = 7 }

Enumerates the functions of GPIO hardware pin 9.

WifiIotIoFuncGpio10 {   WIFI_IOT_IO_FUNC_GPIO_10_GPIO, WIFI_IOT_IO_FUNC_GPIO_10_I2C0_SDA, WIFI_IOT_IO_FUNC_GPIO_10_UART2_CTS_N, WIFI_IOT_IO_FUNC_GPIO_10_SDIO_D3,   WIFI_IOT_IO_FUNC_GPIO_10_SPI0_CK, WIFI_IOT_IO_FUNC_GPIO_10_PWM1_OUT, WIFI_IOT_IO_FUNC_GPIO_10_I2S0_TX = 7 }

Enumerates the functions of GPIO hardware pin 10.

WifiIotIoFuncGpio11 {   WIFI_IOT_IO_FUNC_GPIO_11_GPIO, WIFI_IOT_IO_FUNC_GPIO_11_UART2_TXD = 2, WIFI_IOT_IO_FUNC_GPIO_11_SDIO_CMD, WIFI_IOT_IO_FUNC_GPIO_11_SPI0_RXD,   WIFI_IOT_IO_FUNC_GPIO_11_PWM2_OUT, WIFI_IOT_IO_FUNC_GPIO_11_RF_TX_EN_EXT, WIFI_IOT_IO_FUNC_GPIO_11_I2S0_RX }

Enumerates the functions of GPIO hardware pin 11.

WifiIotIoFuncGpio12 {   WIFI_IOT_IO_FUNC_GPIO_12_GPIO, WIFI_IOT_IO_FUNC_GPIO_12_UART2_RXD = 2, WIFI_IOT_IO_FUNC_GPIO_12_SDIO_CLK, WIFI_IOT_IO_FUNC_GPIO_12_SPI0_CSN,   WIFI_IOT_IO_FUNC_GPIO_12_PWM3_OUT, WIFI_IOT_IO_FUNC_GPIO_12_RF_RX_EN_EXT, WIFI_IOT_IO_FUNC_GPIO_12_I2S0_BCLK }

Enumerates the functions of GPIO hardware pin 12.

WifiIotIoFuncGpio13 {   WIFI_IOT_IO_FUNC_GPIO_13_SSI_DATA, WIFI_IOT_IO_FUNC_GPIO_13_UART0_TXD, WIFI_IOT_IO_FUNC_GPIO_13_UART2_RTS_N, WIFI_IOT_IO_FUNC_GPIO_13_SDIO_D0,   WIFI_IOT_IO_FUNC_GPIO_13_GPIO, WIFI_IOT_IO_FUNC_GPIO_13_PWM4_OUT, WIFI_IOT_IO_FUNC_GPIO_13_I2C0_SDA, WIFI_IOT_IO_FUNC_GPIO_13_I2S0_WS }

Enumerates the functions of GPIO hardware pin 13.

WifiIotIoFuncGpio14 {   WIFI_IOT_IO_FUNC_GPIO_14_SSI_CLK, WIFI_IOT_IO_FUNC_GPIO_14_UART0_RXD, WIFI_IOT_IO_FUNC_GPIO_14_UART2_CTS_N, WIFI_IOT_IO_FUNC_GPIO_14_SDIO_D1,   WIFI_IOT_IO_FUNC_GPIO_14_GPIO, WIFI_IOT_IO_FUNC_GPIO_14_PWM5_OUT, WIFI_IOT_IO_FUNC_GPIO_14_I2C0_SCL }

Enumerates the functions of GPIO hardware pin 14.

WifiIotIoDriverStrength {   WIFI_IOT_IO_DRIVER_STRENGTH_0 = 0, WIFI_IOT_IO_DRIVER_STRENGTH_1, WIFI_IOT_IO_DRIVER_STRENGTH_2, WIFI_IOT_IO_DRIVER_STRENGTH_3,   WIFI_IOT_IO_DRIVER_STRENGTH_4, WIFI_IOT_IO_DRIVER_STRENGTH_5, WIFI_IOT_IO_DRIVER_STRENGTH_6, WIFI_IOT_IO_DRIVER_STRENGTH_7,   WIFI_IOT_IO_DRIVER_STRENGTH_MAX }

Enumerates I/O driver strength levels.

WifiIotIoPull { WIFI_IOT_IO_PULL_NONE, WIFI_IOT_IO_PULL_UP, WIFI_IOT_IO_PULL_DOWN, WIFI_IOT_IO_PULL_MAX }

Enumerates GPIO pull-up or pull-down settings.

WifiIotI2cIdx { WIFI_IOT_I2C_IDX_0, WIFI_IOT_I2C_IDX_1 }

Enumerates I2C hardware indexes.

WifiIotI2sSampleRate { WIFI_IOT_I2S_SAMPLE_RATE_8K = 8, WIFI_IOT_I2S_SAMPLE_RATE_16K = 16, WIFI_IOT_I2S_SAMPLE_RATE_32K = 32, WIFI_IOT_I2S_SAMPLE_RATE_48K = 48 }

Enumerates I2S sampling rates.

WifiIotI2sResolution { WIFI_IOT_I2S_RESOLUTION_16BIT = 16, WIFI_IOT_I2S_RESOLUTION_24BIT = 24 }

Enumerates I2S resolution.

WifiIotFlashPartitionTableId {   WIFI_IOT_FLASH_PARTITON_BOOT = 0, WIFI_IOT_FLASH_PARTITON_FACTORY_NV, WIFI_IOT_FLASH_PARTITON_NORMAL_NV, WIFI_IOT_FLASH_PARTITON_NORMAL_NV_BACKUP,   WIFI_IOT_FLASH_PARTITON_KERNEL_A, WIFI_IOT_FLASH_PARTITON_KERNEL_B, WIFI_IOT_FLASH_PARTITON_HILINK, WIFI_IOT_FLASH_PARTITON_FILE_SYSTEM,   WIFI_IOT_FLASH_PARTITON_USR_RESERVE, WIFI_IOT_FLASH_PARTITON_HILINK_PKI, WIFI_IOT_FLASH_PARTITON_CRASH_INFO, WIFI_IOT_FLASH_PARTITON_BOOT_BACK }

Indicates the partition table ID.

WifiIotPwmClkSource { WIFI_IOT_PWM_CLK_160M, WIFI_IOT_PWM_CLK_XTAL, WIFI_IOT_PWM_CLK_MAX }

Enumerates PWM clock sources.

WifiIotPwmPort {   WIFI_IOT_PWM_PORT_PWM0 = 0, WIFI_IOT_PWM_PORT_PWM1 = 1, WIFI_IOT_PWM_PORT_PWM2 = 2, WIFI_IOT_PWM_PORT_PWM3 = 3,   WIFI_IOT_PWM_PORT_PWM4 = 4, WIFI_IOT_PWM_PORT_PWM5 = 5, WIFI_IOT_PWM_PORT_MAX }

Enumerates PWM ports.

WifiIotSpiIdx { WIFI_IOT_SPI_ID_0 = 0, WIFI_IOT_SPI_ID_1 }

Enumerates SPI channel IDs.

WifiIotSpiCfgClockCpol { WIFI_IOT_SPI_CFG_CLOCK_CPOL_0, WIFI_IOT_SPI_CFG_CLOCK_CPOL_1 }

Enumerates communication polarities.

WifiIotSpiCfgClockCpha { WIFI_IOT_SPI_CFG_CLOCK_CPHA_0, WIFI_IOT_SPI_CFG_CLOCK_CPHA_1 }

Enumerates communication phases.

WifiIotSpiCfgFramMode { WIFI_IOT_SPI_CFG_FRAM_MODE_MOTOROLA, WIFI_IOT_SPI_CFG_FRAM_MODE_TI, WIFI_IOT_SPI_CFG_FRAM_MODE_MICROWIRE }

Enumerates communication protocols.

WifiIotSpiCfgDataWidth {   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_4BIT = 0x3, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_5BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_6BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_7BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_8BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_9BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_10BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_11BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_12BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_13BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_14BIT, WIFI_IOT_SPI_CFG_DATA_WIDTH_E_15BIT,   WIFI_IOT_SPI_CFG_DATA_WIDTH_E_16BIT }

Enumerates the communication data width, that is, the number of valid bits in each frame.

WifiIotSpiCfgEndian { WIFI_IOT_SPI_CFG_ENDIAN_LITTLE, WIFI_IOT_SPI_CFG_ENDIAN_BIG }

Enumerates the endian mode of each frame.

WifiIotUartIdx { WIFI_IOT_UART_IDX_0, WIFI_IOT_UART_IDX_1, WIFI_IOT_UART_IDX_2, WIFI_IOT_UART_IDX_MAX }

Enumerates the UART serial number.

WifiIotUartIdxDataBit { WIFI_IOT_UART_DATA_BIT_5 = 5, WIFI_IOT_UART_DATA_BIT_6, WIFI_IOT_UART_DATA_BIT_7, WIFI_IOT_UART_DATA_BIT_8 }

Enumerates the number of UART data bits.

WifiIotUartStopBit { WIFI_IOT_UART_STOP_BIT_1 = 1, WIFI_IOT_UART_STOP_BIT_2 = 2 }

Enumerates the number of UART stop bits.

WifiIotUartParity { WIFI_IOT_UART_PARITY_NONE = 0, WIFI_IOT_UART_PARITY_ODD = 1, WIFI_IOT_UART_PARITY_EVEN = 2 }

Enumerates the UART parity bit.

WifiIotUartFifoLine {   WIFI_IOT_FIFO_LINE_ONE_EIGHT = 1, WIFI_IOT_FIFO_LINE_ONE_QUARTER, WIFI_IOT_FIFO_LINE_HALF, WIFI_IOT_FIFO_LINE_THREE_QUARTERS,   WIFI_IOT_FIFO_LINE_SEVEN_EIGHTS }

Enumerates UART FIFO interrupt thresholds.

WifiIotUartBlockState { WIFI_IOT_UART_BLOCK_STATE_NONE_BLOCK = 1, WIFI_IOT_UART_BLOCK_STATE_BLOCK }

Enumerates UART block states.

WifiIotUartDmaState { WIFI_IOT_UART_NONE_DMA = 1, WIFI_IOT_UART_USE_DMA }

Enumerates UART DMA states.

WifiIotFlowCtrl { WIFI_IOT_FLOW_CTRL_NONE, WIFI_IOT_FLOW_CTRL_RTS_CTS, WIFI_IOT_FLOW_CTRL_RTS_ONLY, WIFI_IOT_FLOW_CTRL_CTS_ONLY }

Enumerates hardware flow control modes.

Functions

Function Name

Description

AdcRead (WifiIotAdcChannelIndex channel, unsigned short data, WifiIotAdcEquModelSel equModel, WifiIotAdcCurBais curBais, unsigned short rstCnt)

unsigned int 

Reads a piece of sampled data from a specified ADC channel based on the input parameters.

AtRegisterCmd (const AtCmdTbl cmdTbl, unsigned short cmdNum)

unsigned int 

Registers a certain number of AT commands.

AtSysCmdRegister (void)

void 

Registers a system AT command.

AtPrintf (const char fmt,…)

int 

Formats data and outputs it to the AT command terminal.

AtInit (void)

unsigned int 

Initializes an AT command task.

AtCheckUartBusy (unsigned char enable)

void 

Sets whether to check the UART busy status during low-power voting.

FlashRead (const unsigned int flashOffset, const unsigned int size, unsigned char ramData)

unsigned int 

Reads data from a flash memory address.

FlashWrite (const unsigned int flashOffset, unsigned int size, const unsigned char ramData, unsigned char doErase)

unsigned int 

Writes data to a flash memory address.

FlashErase (const unsigned int flashOffset, const unsigned int size)

unsigned int 

Erases data in a specified flash memory address.

FlashInit (void)

unsigned int 

Initializes the flash device.

FlashDeinit (void)

unsigned int 

Deinitializes the flash device.

FlashIoctl (unsigned short cmd, char data)

unsigned int 

Obtains flash information based on a specific command.

GpioInit (void)

unsigned int 

Initializes the GPIO device.

GpioDeinit (void)

unsigned int 

Deinitializes the GPIO device.

GpioSetDir (WifiIotGpioIdx id, WifiIotGpioDir dir)

unsigned int 

Sets the direction for a GPIO pin.

GpioGetDir (WifiIotGpioIdx id, WifiIotGpioDir dir)

unsigned int 

Obtains the direction for a GPIO pin.

GpioSetOutputVal (WifiIotGpioIdx id, WifiIotGpioValue val)

unsigned int 

Sets the output level value for a GPIO pin.

GpioGetOutputVal (WifiIotGpioIdx id, WifiIotGpioValue val)

unsigned int 

Obtains the output level value of a GPIO pin.

GpioGetInputVal (WifiIotGpioIdx id, WifiIotGpioValue val)

unsigned int 

Obtains the input level value of a GPIO pin.

GpioRegisterIsrFunc (WifiIotGpioIdx id, WifiIotGpioIntType intType, WifiIotGpioIntPolarity intPolarity, GpioIsrCallbackFunc func, char arg)

unsigned int 

Enables the interrupt function for a GPIO pin.

GpioUnregisterIsrFunc (WifiIotGpioIdx id)

unsigned int 

Disables the interrupt function for a GPIO pin.

GpioSetIsrMask (WifiIotGpioIdx id, unsigned char mask)

unsigned int 

Masks the interrupt function for a GPIO pin.

GpioSetIsrMode (WifiIotGpioIdx id, WifiIotGpioIntType intType, WifiIotGpioIntPolarity intPolarity)

unsigned int 

Sets the interrupt trigger mode of a GPIO pin.

IoSetPull (WifiIotIoName id, WifiIotIoPull val)

unsigned int 

Sets the pull for a GPIO pin.

IoSetFunc (WifiIotIoName id, unsigned char val)

unsigned int 

Sets the multiplexing function for a GPIO pin.

IoGetPull (WifiIotIoName id, WifiIotIoPull val)

unsigned int 

Obtains the pull type of a GPIO pin.

IoGetFunc (WifiIotIoName id, unsigned char val)

unsigned int 

Obtains the multiplexing function for a GPIO pin.

IOGetDriverStrength (WifiIotIoName id, WifiIotIoDriverStrength val)

unsigned int 

Obtains the driver strength of a GPIO pin.

IOSetDriverStrength (WifiIotIoName id, WifiIotIoDriverStrength val)

unsigned int 

Sets the driver strength of a GPIO pin.

I2cInit (WifiIotI2cIdx id, unsigned int baudrate)

unsigned int 

Initializes an I2C device with a specified baud rate.

I2cDeinit (WifiIotI2cIdx id)

unsigned int 

Deinitializes an I2C device.

I2cWrite (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData i2cData)

unsigned int 

Writes data to an I2C device.

I2cRead (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData i2cData)

unsigned int 

Reads data from an I2C device.

I2cWriteread (WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData i2cData)

unsigned int 

Sends data to and receives data responses from an I2C device.

I2cRegisterResetBusFunc (WifiIotI2cIdx id, WifiIotI2cFunc pfn)

void 

Registers an I2C callback.

I2cSetBaudrate (WifiIotI2cIdx id, unsigned int baudrate)

unsigned int 

Sets the baud rate for an I2C device.

I2sInit (const WifiIotI2sAttribute i2sAttribute)

unsigned int 

Initializes the I2S device.

I2sDeinit (void)

unsigned int 

Deinitializes the I2S device.

I2sWrite (unsigned char wrData, unsigned int wrLen, unsigned int timeOutMs)

unsigned int 

Writes data to the I2S device.

I2sRead (unsigned char rdData, unsigned int rdLen, unsigned int timeOutMs)

unsigned int 

Reads data from the I2S device.

KalTickRegisterCallback (TickIdleKalCallback cb)

void 

Registers the CPU tick callback.

KalThreadRegisterIdleCallback (TickIdleKalCallback cb)

void 

Registers the idle task callback.

FlashPartitionInit (void)

unsigned int 

Initializes a flash partition.

GetPartitionTable (void)

WifiIotFlashPartitionTable  

Obtains a flash partition table.

PwmInit (WifiIotPwmPort port)

unsigned int 

Initializes a PWM device.

PwmDeinit (WifiIotPwmPort port)

unsigned int 

Deinitializes a PWM device.

PwmStart (WifiIotPwmPort port, unsigned short duty, unsigned short freq)

unsigned int 

Outputs PWM signals based on the input parameters.

PwmStop (WifiIotPwmPort port)

unsigned int 

Stops the PWM signal output.

SdioInit (void)

unsigned int 

Initializes the SDIO device.

SdioReinit (void)

unsigned int 

Reinitializes the SDIO device.

SdioSoftReset (void)

void 

Resets the SDIO device.

SdioRegisterCallback (const WifiIotSdioIntcallback callbackFunc)

unsigned int 

Registers an interrupt callback for the SDIO device.

SdioCompleteSend (unsigned char admaTable, unsigned int admaIndex)

unsigned int 

Completes data sending on the SDIO device.

SdioSetPadAdmatab (unsigned int padlen, unsigned char admatable, unsigned int admaIndex)

unsigned int 

Sets the ADMA table that requires data padding.

SdioWriteExtinfo (WifiIotSdioExtendFunc extFunc)

unsigned int 

Sets the extended SDIO attributes.

SdioSendData (unsigned int xferBytes)

void 

Starts to send data.

SdioSetAdmatable (unsigned char admatable, unsigned int admaIndex, const unsigned int dataAddr, unsigned int dataLen)

unsigned int 

Sets an SDIO ADMA.

SdioSchedMsg (void)

unsigned int 

Sends a suspended SDIO message.

SdioSendSyncMsg (unsigned int msg)

unsigned int 

Adds a message to a message queue and sends the message.

SdioSendMsgAck (unsigned int msg)

unsigned int 

Sends a specified message.

SdioProcessMsg (unsigned int sendMsg, unsigned int clearMsg)

unsigned int 

Clears a specified suspended message in the message queue, adds a new message to it, and sends the new message.

SdioIsPendingMsg (unsigned int msg)

unsigned int 

Checks whether a specified message is suspended.

SdioIsSendingMsg (unsigned int msg)

unsigned int 

Checks whether a specified message is being sent.

SdioGetExtendInfo (void)

WifiIotSdioExtendFunc  

Obtains the extended configuration.

SdioRegisterNotifyMessageCallback (NotifyHostMessageEvent msgEventCallback)

void 

Registers the callback that will be invoked when the host sends a message or data.

SdioSetPowerdownWhenDeepSleep (unsigned char powerDown)

void 

Sets whether the SDIO device is powered off in deep sleep mode.

SpiSlaveWrite (WifiIotSpiIdx spiId, char writeData, unsigned int byteLen, unsigned int timeOutMs)

unsigned int 

Sends data in SPI slave mode.

SpiSlaveRead (WifiIotSpiIdx spiId, char readData, unsigned int byteLen, unsigned int timeOutMs)

unsigned int 

Reads data in SPI slave mode.

SpiHostWrite (WifiIotSpiIdx spiId, char writeData, unsigned int byteLen)

unsigned int 

Sends data in half-duplex SPI master mode.

SpiHostRead (WifiIotSpiIdx spiId, char readData, unsigned int byteLen)

unsigned int 

Reads data in half-duplex SPI master mode.

SpiHostWriteread (WifiIotSpiIdx spiId, char writeData, char readData, unsigned int byteLen)

unsigned int 

Sends and reads data in full-duplex SPI master mode.

SpiSetBasicInfo (WifiIotSpiIdx spiId, const WifiIotSpiCfgBasicInfo param)

unsigned int 

Sets the SPI channel parameter.

SpiInit (WifiIotSpiIdx spiId, WifiIotSpiCfgInitParam initParam, const WifiIotSpiCfgBasicInfo param)

unsigned int 

Initializes an SPI device.

SpiDeinit (WifiIotSpiIdx spiId)

unsigned int 

Deinitializes an SPI device.

SpiSetIrqMode (WifiIotSpiIdx spiId, unsigned char irqEn)

unsigned int 

Sets whether to enable the interrupt request (IRQ) mode for an SPI device.

SpiSetDmaMode (WifiIotSpiIdx spiId, unsigned char dmaEn)

unsigned int 

Sets whether to enable DMA to transfer data for an SPI device in slave mode.

SpiRegisterUsrFunc (WifiIotSpiIdx spiId, SpiIsrFunc prepareF, SpiIsrFunc restoreF)

unsigned int 

Registers the data TX preparation/recovery function.

SpiSetLoopBackMode (WifiIotSpiIdx spiId, unsigned char lbEn)

unsigned int 

Sets whether to enable loopback test for an SPI device.

UartInit (WifiIotUartIdx id, const WifiIotUartAttribute param, const WifiIotUartExtraAttr extraAttr)

unsigned int 

Configures a UART device.

UartRead (WifiIotUartIdx id, unsigned char data, unsigned int dataLen)

int 

Reads data from a UART device.

UartWrite (WifiIotUartIdx id, const unsigned char data, unsigned int dataLen)

int 

Writes data to a UART device.

UartDeinit (WifiIotUartIdx id)

unsigned int 

Deinitializes a UART device.

UartSetFlowCtrl (WifiIotUartIdx id, WifiIotFlowCtrl flowCtrl)

unsigned int 

Sets UART hardware flow control.

UartIsBufEmpty (WifiIotUartIdx id, unsigned char empty)

unsigned int 

Checks whether the buffer on a UART device is empty.

UartWriteImmediately (WifiIotUartIdx id, const unsigned char data, unsigned int dataLen)

int 

Writes data to be sent to a UART device in polling mode.

UartGetAttribute (WifiIotUartIdx id, WifiIotUartAttribute attr, WifiIotUartExtraAttr extraAttr)

unsigned int 

Obtains UART attributes.

UartIsBusy (WifiIotUartIdx id, unsigned char busy)

unsigned int 

Checks whether the buffer on a UART device is busy.

WatchDogEnable (void)

void 

Enables the watchdog.

WatchDogKick (void)

void 

Feeds the watchdog.

WatchDogDisable (void)

void 

Disables the watchdog.

Details

Macro Definition Documentation

WIFI_IOT_ERR_ADC_INVALID_CHANNEL_ID

  1. #define WIFI_IOT_ERR_ADC_INVALID_CHANNEL_ID 0x80001301

Description:

Defines an ADC error code to indicate an invalid channel.

WIFI_IOT_ERR_ADC_NOT_INIT

  1. #define WIFI_IOT_ERR_ADC_NOT_INIT 0x80001303

Description:

Defines an ADC error code to indicate non-initialization.

WIFI_IOT_ERR_ADC_PARAMETER_WRONG

  1. #define WIFI_IOT_ERR_ADC_PARAMETER_WRONG 0x80001300

Description:

Defines an ADC error code to indicate a parameter error.

WIFI_IOT_ERR_ADC_TIMEOUT

  1. #define WIFI_IOT_ERR_ADC_TIMEOUT 0x80001302

Description:

Defines an ADC error code to indicate a timeout.

WIFI_IOT_ERR_AT_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_AT_INVALID_PARAMETER 0x80003281

Description:

Defines an AT error code to indicate an invalid parameter.

WIFI_IOT_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED

  1. #define WIFI_IOT_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED 0x80003280

Description:

Defines an AT error code to indicate repeated function registration.

WIFI_IOT_ERR_DMA_BUSY

  1. #define WIFI_IOT_ERR_DMA_BUSY 0x80001382

Description:

Defines a DMA error code to indicate the busy state.

WIFI_IOT_ERR_DMA_CH_IRQ_ENABLE_FAIL

  1. #define WIFI_IOT_ERR_DMA_CH_IRQ_ENABLE_FAIL 0x80001387

Description:

Defines a DMA error code to indicate a failure in enabling channel interrupt.

WIFI_IOT_ERR_DMA_GET_NOTE_FAIL

  1. #define WIFI_IOT_ERR_DMA_GET_NOTE_FAIL 0x80001385

Description:

Defines a DMA error code to indicate a retrieval failure.

WIFI_IOT_ERR_DMA_INVALID_PARA

  1. #define WIFI_IOT_ERR_DMA_INVALID_PARA 0x80001380

Description:

Defines a DMA error code to indicate an invalid parameter.

WIFI_IOT_ERR_DMA_LLI_NOT_CREATE

  1. #define WIFI_IOT_ERR_DMA_LLI_NOT_CREATE 0x80001386

Description:

Defines a DMA error code to indicate that the LLI is not created.

WIFI_IOT_ERR_DMA_NOT_INIT

  1. #define WIFI_IOT_ERR_DMA_NOT_INIT 0x80001381

Description:

Defines a DMA error code to indicate non-initialization.

WIFI_IOT_ERR_DMA_TRANSFER_FAIL

  1. #define WIFI_IOT_ERR_DMA_TRANSFER_FAIL 0x80001383

Description:

Defines a DMA error code to indicate a transmission failure.

WIFI_IOT_ERR_DMA_TRANSFER_TIMEOUT

  1. #define WIFI_IOT_ERR_DMA_TRANSFER_TIMEOUT 0x80001384

Description:

Defines a DMA error code to indicate a transmission timeout.

WIFI_IOT_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE 0x800010F1

Description:

Defines a flash error code to indicate that the address is out of range.

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR 0x800001F4

Description:

Defines a flash error code to indicate a decryption error.

WIFI_IOT_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR 0x800001F3

Description:

Defines a flash error code to indicate an encryption error.

WIFI_IOT_ERR_FLASH_CRYPTO_INVALID_PARAM

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_INVALID_PARAM 0x800010F0

Description:

Defines a flash error code to indicate an invalid parameter.

WIFI_IOT_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR 0x800001FB

Description:

Defines a flash error code to indicate an incorrect kernel address..

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR 0x800001F5

Description:

Defines a flash error code to indicate an empty key value.

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_INVALID_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_KEY_INVALID_ERR 0x800001F9

Description:

Defines a flash error code to indicate an invalid key.

WIFI_IOT_ERR_FLASH_CRYPTO_KEY_SAVE_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_KEY_SAVE_ERR 0x800001FA

Description:

Defines a flash error code to indicate a failure in saving the key.

WIFI_IOT_ERR_FLASH_CRYPTO_MALLOC_FAIL

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_MALLOC_FAIL 0x800001F2

Description:

Defines a flash error code to indicate a failure in applying for memory.

WIFI_IOT_ERR_FLASH_CRYPTO_MEMCPY_FAIL

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_MEMCPY_FAIL 0x800001F6

Description:

Defines a flash error code to indicate a copy failure.

WIFI_IOT_ERR_FLASH_CRYPTO_NOT_SUPPORT

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_NOT_SUPPORT 0x800001F7

Description:

Defines a flash error code to indicate a non-support for encryption.

WIFI_IOT_ERR_FLASH_CRYPTO_PREPARE_ERR

  1. #define WIFI_IOT_ERR_FLASH_CRYPTO_PREPARE_ERR 0x800001F8

Description:

Defines a flash error code to indicate an incorrect parameter during encryption.

WIFI_IOT_ERR_FLASH_ERASE_NOT_4K_ALIGN

  1. #define WIFI_IOT_ERR_FLASH_ERASE_NOT_4K_ALIGN 0x800010DB

Description:

Defines a flash error code to indicate that the size of data to erase is not a multiple of 4K bytes.

WIFI_IOT_ERR_FLASH_INITILIZATION

  1. #define WIFI_IOT_ERR_FLASH_INITILIZATION 0x800010DA

Description:

Defines a flash error code to indicate initialization.

WIFI_IOT_ERR_FLASH_INVALID_CHIP_ID

  1. #define WIFI_IOT_ERR_FLASH_INVALID_CHIP_ID 0x800010D4

Description:

Defines a flash error code to indicate an invalid chip ID.

WIFI_IOT_ERR_FLASH_INVALID_PARAM

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM 0x800010C1

Description:

Defines a flash error code to indicate an invalid parameter.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR 0x800010C2

Description:

Defines a flash error code to indicate that the address is out of range.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_DATA_NULL

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_DATA_NULL 0x800010C6

Description:

Defines a flash error code to indicate empty data.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN 0x800010C4

Description:

Defines a flash error code to indicate that the erase size is not aligned.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL 0x800010C5

Description:

Defines a flash error code to indicate that the data of the I/O controller is empty.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD1

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD1 0x800010C7

Description:

Defines a flash error code to indicate that pad1 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD2

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD2 0x800010C8

Description:

Defines a flash error code to indicate that pad2 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD3

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD3 0x800010C9

Description:

Defines a flash error code to indicate that pad3 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD4

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_PAD4 0x800010CA

Description:

Defines a flash error code to indicate that pad4 is incorrect.

WIFI_IOT_ERR_FLASH_INVALID_PARAM_SIZE_ZERO

  1. #define WIFI_IOT_ERR_FLASH_INVALID_PARAM_SIZE_ZERO 0x800010C3

Description:

Defines a flash error code to indicate that the parameter size is 0

WIFI_IOT_ERR_FLASH_MAX_SPI_OP

  1. #define WIFI_IOT_ERR_FLASH_MAX_SPI_OP 0x800010D2

Description:

Defines a flash error code to indicate the maximum value of the SPI operation.

WIFI_IOT_ERR_FLASH_NO_MATCH_ERASE_SIZE

  1. #define WIFI_IOT_ERR_FLASH_NO_MATCH_ERASE_SIZE 0x800010D1

Description:

Defines a flash error code to indicate a mismatch in the size of data to erase.

WIFI_IOT_ERR_FLASH_NO_MATCH_FLASH

  1. #define WIFI_IOT_ERR_FLASH_NO_MATCH_FLASH 0x800010CF

Description:

Defines a flash error code to indicate a flash mismatch.

WIFI_IOT_ERR_FLASH_NOT_INIT

  1. #define WIFI_IOT_ERR_FLASH_NOT_INIT 0x800010C0

Description:

Defines a flash error code to indicate non-initialization.

WIFI_IOT_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID

  1. #define WIFI_IOT_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID 0x800010D3

Description:

Defines a flash error code to indicate an unsupported IO controller ID..

WIFI_IOT_ERR_FLASH_PATITION_INIT_FAIL

  1. #define WIFI_IOT_ERR_FLASH_PATITION_INIT_FAIL 0x800010D9

Description:

Defines a flash error code to indicate a partition initialization failure.

WIFI_IOT_ERR_FLASH_PROTECT_NOT_FIND_CHIP

  1. #define WIFI_IOT_ERR_FLASH_PROTECT_NOT_FIND_CHIP 0x800010DF

Description:

Defines a flash error code to indicate that no chip is found.

WIFI_IOT_ERR_FLASH_PROTECT_NOT_INIT

  1. #define WIFI_IOT_ERR_FLASH_PROTECT_NOT_INIT 0x800010DD

Description:

Defines a flash error code to indicate non-initialization.

WIFI_IOT_ERR_FLASH_PROTECT_NOT_SUPPORT

  1. #define WIFI_IOT_ERR_FLASH_PROTECT_NOT_SUPPORT 0x800010DC

Description:

Defines a flash error code to indicate a non-support.

WIFI_IOT_ERR_FLASH_PROTECT_RE_INIT

  1. #define WIFI_IOT_ERR_FLASH_PROTECT_RE_INIT 0x800010DE

Description:

Defines a flash error code to indicate repeated initialization.

WIFI_IOT_ERR_FLASH_QUAD_MODE_COMPARE_REG

  1. #define WIFI_IOT_ERR_FLASH_QUAD_MODE_COMPARE_REG 0x800010CE

Description:

Defines a flash error code to indicate that an error occurs when comparing registers.

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG1

  1. #define WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG1 0x800010CC

Description:

Defines a flash error code to indicate that an error occurs when reading register 1.

WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG2

  1. #define WIFI_IOT_ERR_FLASH_QUAD_MODE_READ_REG2 0x800010CD

Description:

Defines a flash error code to indicate that an error occurs when reading register 2.

WIFI_IOT_ERR_FLASH_RE_INIT

  1. #define WIFI_IOT_ERR_FLASH_RE_INIT 0x800010D5

Description:

Defines a flash error code to indicate repeated initialization.

WIFI_IOT_ERR_FLASH_TIME_OUT_WAIT_READY

  1. #define WIFI_IOT_ERR_FLASH_TIME_OUT_WAIT_READY 0x800010CB

Description:

Defines a flash error code to indicate a timeout on waiting for ready.

WIFI_IOT_ERR_FLASH_WAIT_CFG_START_TIME_OUT

  1. #define WIFI_IOT_ERR_FLASH_WAIT_CFG_START_TIME_OUT 0x800010D8

Description:

Defines a flash error code to indicate a timeout on waiting for a configuration to start.

WIFI_IOT_ERR_FLASH_WRITE_COMPARE_WRONG

  1. #define WIFI_IOT_ERR_FLASH_WRITE_COMPARE_WRONG 0x800010D7

Description:

Defines a flash error code to indicate that an error occurs when comparing the data written.

WIFI_IOT_ERR_FLASH_WRITE_ENABLE

  1. #define WIFI_IOT_ERR_FLASH_WRITE_ENABLE 0x800010D0

Description:

Defines a flash error code to indicate a failure in enabling write.

WIFI_IOT_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE

  1. #define WIFI_IOT_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE 0x800010D6

Description:

Defines a flash error code to indicate a non-support for data erasure.

WIFI_IOT_ERR_GPIO_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_GPIO_INVALID_PARAMETER 0x80001040

Description:

Defines a GPIO error code to indicate an invalid parameter.

WIFI_IOT_ERR_GPIO_NOT_INIT

  1. #define WIFI_IOT_ERR_GPIO_NOT_INIT 0x80001042

Description:

Defines a GPIO error code to indicate non-initialization.

WIFI_IOT_ERR_GPIO_NOT_SUPPORT

  1. #define WIFI_IOT_ERR_GPIO_NOT_SUPPORT 0x80001043

Description:

Defines a GPIO error code to indicate a non-support.

WIFI_IOT_ERR_GPIO_REPEAT_INIT

  1. #define WIFI_IOT_ERR_GPIO_REPEAT_INIT 0x80001041

Description:

Defines a GPIO error code to indicate repeated initialization.

WIFI_IOT_ERR_I2C_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_I2C_INVALID_PARAMETER 0x80001181

Description:

Defines an I2C error code to indicate an invalid parameter.

WIFI_IOT_ERR_I2C_NOT_INIT

  1. #define WIFI_IOT_ERR_I2C_NOT_INIT 0x80001180

Description:

Defines an I2C error code to indicate a non-support.

WIFI_IOT_ERR_I2C_START_ACK_ERR

  1. #define WIFI_IOT_ERR_I2C_START_ACK_ERR 0x80001188

Description:

Defines an I2C error code to indicate a responding failure.

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE

  1. #define WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE 0x80001185

Description:

Defines an I2C error code to indicate a receive timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE_PROC

  1. #define WIFI_IOT_ERR_I2C_TIMEOUT_RCV_BYTE_PROC 0x80001186

Description:

Defines an I2C error code to indicate a processing timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_START

  1. #define WIFI_IOT_ERR_I2C_TIMEOUT_START 0x80001182

Description:

Defines an I2C error code to indicate a start timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_STOP

  1. #define WIFI_IOT_ERR_I2C_TIMEOUT_STOP 0x80001184

Description:

Defines an I2C error code to indicate a stop timeout.

WIFI_IOT_ERR_I2C_TIMEOUT_WAIT

  1. #define WIFI_IOT_ERR_I2C_TIMEOUT_WAIT 0x80001183

Description:

Defines an I2C error code to indicate a wait timeout.

WIFI_IOT_ERR_I2C_WAIT_ACK_ERR

  1. #define WIFI_IOT_ERR_I2C_WAIT_ACK_ERR 0x80001189

Description:

Defines an I2C error code to indicate a failure in waiting for a response.

WIFI_IOT_ERR_I2C_WAIT_SEM_FAIL

  1. #define WIFI_IOT_ERR_I2C_WAIT_SEM_FAIL 0x80001187

Description:

Defines an I2C error code to indicate a waiting failure.

WIFI_IOT_ERR_I2S_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_I2S_INVALID_PARAMETER 0x80001400

Description:

Defines an I2S error code to indicate an invalid parameter.

WIFI_IOT_ERR_I2S_WRITE_TIMEOUT

  1. #define WIFI_IOT_ERR_I2S_WRITE_TIMEOUT 0x80001401

Description:

Defines an I2S error code to indicate a write timeout.

WIFI_IOT_ERR_PWM_INITILIZATION_ALREADY

  1. #define WIFI_IOT_ERR_PWM_INITILIZATION_ALREADY 0x80001341

Description:

Defines a PWM error code to indicate an initialization error.

WIFI_IOT_ERR_PWM_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_PWM_INVALID_PARAMETER 0x80001342

Description:

Defines a PWM error code to indicate an invalid parameter.

WIFI_IOT_ERR_PWM_NO_INIT

  1. #define WIFI_IOT_ERR_PWM_NO_INIT 0x80001340

Description:

Defines a PWM error code to indicate non-initialization.

WIFI_IOT_ERR_SDIO_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_SDIO_INVALID_PARAMETER 0x80001280

Description:

Defines an SDIO error code to indicate an invalid parameter.

WIFI_IOT_ERR_SPI_BUSY

  1. #define WIFI_IOT_ERR_SPI_BUSY 0x800011C3

Description:

Defines an SPI error code to indicate the busy state.

WIFI_IOT_ERR_SPI_NOT_INIT

  1. #define WIFI_IOT_ERR_SPI_NOT_INIT 0x800011C0

Description:

Defines an SPI error code to indicate non-initialization.

WIFI_IOT_ERR_SPI_NOT_SUPPORT_DMA

  1. #define WIFI_IOT_ERR_SPI_NOT_SUPPORT_DMA 0x800011C6

Description:

Defines an SPI error code to indicate a non-support for DMA.

WIFI_IOT_ERR_SPI_PARAMETER_WRONG

  1. #define WIFI_IOT_ERR_SPI_PARAMETER_WRONG 0x800011C2

Description:

Defines an SPI error code to indicate a parameter error.

WIFI_IOT_ERR_SPI_READ_TIMEOUT

  1. #define WIFI_IOT_ERR_SPI_READ_TIMEOUT 0x800011C5

Description:

Defines an SPI error code to indicate a read timeout.

WIFI_IOT_ERR_SPI_REINIT

  1. #define WIFI_IOT_ERR_SPI_REINIT 0x800011C1

Description:

Defines an SPI error code to indicate repeated initialization.

WIFI_IOT_ERR_SPI_WRITE_TIMEOUT

  1. #define WIFI_IOT_ERR_SPI_WRITE_TIMEOUT 0x800011C4

Description:

Defines an SPI error code to indicate a write timeout.

WIFI_IOT_ERR_UART_INVALID_BAUD

  1. #define WIFI_IOT_ERR_UART_INVALID_BAUD 0x80001005

Description:

Defines a UART error code to indicate an invalid baud rate.

WIFI_IOT_ERR_UART_INVALID_COM_PORT

  1. #define WIFI_IOT_ERR_UART_INVALID_COM_PORT 0x80001006

Description:

Defines a UART error code to indicate an invalid port number.

WIFI_IOT_ERR_UART_INVALID_DATA_BITS

  1. #define WIFI_IOT_ERR_UART_INVALID_DATA_BITS 0x80001003

Description:

Defines a UART error code to indicate an invalid data bit.

WIFI_IOT_ERR_UART_INVALID_PARAMETER

  1. #define WIFI_IOT_ERR_UART_INVALID_PARAMETER 0x80001000

Description:

Defines a UART error code to indicate an invalid parameter.

WIFI_IOT_ERR_UART_INVALID_PARITY

  1. #define WIFI_IOT_ERR_UART_INVALID_PARITY 0x80001002

Description:

Defines a UART error code to indicate an invalid parity check.

WIFI_IOT_ERR_UART_INVALID_STOP_BITS

  1. #define WIFI_IOT_ERR_UART_INVALID_STOP_BITS 0x80001004

Description:

Defines a UART error code to indicate an invalid stop bit.

WIFI_IOT_ERR_UART_INVALID_SUSPEND

  1. #define WIFI_IOT_ERR_UART_INVALID_SUSPEND 0x80001001

Description:

Defines a UART error code to indicate an invalid pause operation.

WIFI_IOT_ERR_UART_NOT_BLOCK_MODE

  1. #define WIFI_IOT_ERR_UART_NOT_BLOCK_MODE 0x80001008

Description:

Defines a UART error code to indicate the non-block mode.

WIFI_IOT_ERR_UART_NOT_SUPPORT_DMA

  1. #define WIFI_IOT_ERR_UART_NOT_SUPPORT_DMA 0x80001007

Description:

Defines a UART error code to indicate a non-support for DMA.

WIFI_IOT_FAILURE

  1. #define WIFI_IOT_FAILURE (-1)

Description:

Defines a module-level return value to indicate an operation failure.

WIFI_IOT_SUCCESS

  1. #define WIFI_IOT_SUCCESS 0

Description:

Defines a module-level return value to indicate a successful operation.

Typedef Documentation

GpioIsrCallbackFunc

  1. typedef void(* GpioIsrCallbackFunc) (char *arg)

Description:

Indicates the GPIO interrupt callback.

I2cPrepareFunc

  1. typedef void(* I2cPrepareFunc) (void)

Description:

Indicates the callback invoked for device preparation.

I2CResetFunc

  1. typedef void(* I2CResetFunc) (void)

Description:

Indicates the callback invoked when a device exception occurs.

I2cRestoreFunc

  1. typedef void(* I2cRestoreFunc) (void)

Description:

Indicates the callback invoked for device recovery.

TickIdleKalCallback

  1. typedef void(* TickIdleKalCallback) (void)

Description:

Indicates the idle task and CPU tick callbacks.

Enumeration Type Documentation

WifiiIotIoFuncGpio1

  1. enum [WifiiIotIoFuncGpio1]($api-api-LinkIoT-Wifiiot.md#gae9c6ae0f852d8701036823a6223adf7e)

Description:

Enumerates the functions of GPIO hardware pin 1.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_1_GPIO 

GPIO1 function

WifiIotAdcChannelIndex

  1. enum [WifiIotAdcChannelIndex]($api-api-LinkIoT-Wifiiot.md#ga4c8b663163c7b23071914947a2bca73b)

Description:

Enumerates ADC channel indexes.

Enumerator

Description

WIFI_IOT_ADC_CHANNEL_0 

Channel 0

WIFI_IOT_ADC_CHANNEL_1 

Channel 1

WIFI_IOT_ADC_CHANNEL_2 

Channel 2

WIFI_IOT_ADC_CHANNEL_3 

Channel 3

WIFI_IOT_ADC_CHANNEL_4 

Channel 4

WIFI_IOT_ADC_CHANNEL_5 

Channel 5

WIFI_IOT_ADC_CHANNEL_6 

Channel 6

WIFI_IOT_ADC_CHANNEL_7 

Channel 7

WIFI_IOT_ADC_CHANNEL_BUTT 

Button value

WifiIotAdcCurBais

  1. enum [WifiIotAdcCurBais]($api-api-LinkIoT-Wifiiot.md#gaac161eb7075f815f6d39a63615bfa82d)

Description:

Enumerates analog power control modes.

Enumerator

Description

WIFI_IOT_ADC_CUR_BAIS_DEFAULT 

Automatic control

WIFI_IOT_ADC_CUR_BAIS_AUTO 

Automatic control

WIFI_IOT_ADC_CUR_BAIS_1P8V 

Manual control (AVDD = 1.8 V)

WIFI_IOT_ADC_CUR_BAIS_3P3V 

Manual control (AVDD = 3.3 V)

WIFI_IOT_ADC_CUR_BAIS_BUTT 

Button value

WifiIotAdcEquModelSel

  1. enum [WifiIotAdcEquModelSel]($api-api-LinkIoT-Wifiiot.md#gafb9992ebf1655f994dc56883c8fe4b2e)

Description:

Enumerates equation models.

Enumerator

Description

WIFI_IOT_ADC_EQU_MODEL_1 

One-equation model

WIFI_IOT_ADC_EQU_MODEL_2 

Two-equation model

WIFI_IOT_ADC_EQU_MODEL_4 

Four-equation model

WIFI_IOT_ADC_EQU_MODEL_8 

Eight-equation model

WIFI_IOT_ADC_EQU_MODEL_BUTT 

Button value

WifiIotFlashPartitionTableId

  1. enum [WifiIotFlashPartitionTableId]($api-api-LinkIoT-Wifiiot.md#ga2f287bbb40987fe6d1d7fa525574c00c)

Description:

Indicates the partition table ID.

Enumerator

Description

WIFI_IOT_FLASH_PARTITON_BOOT 

Boot partition ID

WIFI_IOT_FLASH_PARTITON_FACTORY_NV 

Factory NV partition ID

WIFI_IOT_FLASH_PARTITON_NORMAL_NV 

Normal NV partition ID

WIFI_IOT_FLASH_PARTITON_NORMAL_NV_BACKUP 

Normal backup NV partition ID

WIFI_IOT_FLASH_PARTITON_KERNEL_A 

Kernel A running partition ID

WIFI_IOT_FLASH_PARTITON_KERNEL_B 

Kernel B running partition ID

WIFI_IOT_FLASH_PARTITON_HILINK 

HiLink partition ID

WIFI_IOT_FLASH_PARTITON_FILE_SYSTEM 

File system partition ID

WIFI_IOT_FLASH_PARTITON_USR_RESERVE 

User reserved partition ID

WIFI_IOT_FLASH_PARTITON_HILINK_PKI 

HiLink PKI partition ID

WIFI_IOT_FLASH_PARTITON_CRASH_INFO 

Crash log partition ID

WIFI_IOT_FLASH_PARTITON_BOOT_BACK 

Backup boot partition ID

WifiIotFlowCtrl

  1. enum [WifiIotFlowCtrl]($api-api-LinkIoT-Wifiiot.md#gacf7ec5d973706e8239c7c6e4a470d8ab)

Description:

Enumerates hardware flow control modes.

Enumerator

Description

WIFI_IOT_FLOW_CTRL_NONE 

Hardware flow control disabled

WIFI_IOT_FLOW_CTRL_RTS_CTS 

RTS and CTS hardware flow control enabled

WIFI_IOT_FLOW_CTRL_RTS_ONLY 

RTS hardware flow control enabled

WIFI_IOT_FLOW_CTRL_CTS_ONLY 

RTS hardware flow control enabled

WifiIotGpioDir

  1. enum [WifiIotGpioDir]($api-api-LinkIoT-Wifiiot.md#gab4b1fb50c758d491ba297a65e1c7a70a)

Description:

Enumerates GPIO directions.

Enumerator

Description

WIFI_IOT_GPIO_DIR_IN 

Input

WIFI_IOT_GPIO_DIR_OUT 

Output

WifiIotGpioIdx

  1. enum [WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7)

Description:

Enumerates GPIO pin IDs.

Enumerator

Description

WIFI_IOT_GPIO_IDX_0 

GPIO0

WIFI_IOT_GPIO_IDX_1 

GPIO1

WIFI_IOT_GPIO_IDX_2 

GPIO2

WIFI_IOT_GPIO_IDX_3 

GPIO3

WIFI_IOT_GPIO_IDX_4 

GPIO4

WIFI_IOT_GPIO_IDX_5 

GPIO5

WIFI_IOT_GPIO_IDX_6 

GPIO6

WIFI_IOT_GPIO_IDX_7 

GPIO7

WIFI_IOT_GPIO_IDX_8 

GPIO8

WIFI_IOT_GPIO_IDX_9 

GPIO9

WIFI_IOT_GPIO_IDX_10 

GPIO10

WIFI_IOT_GPIO_IDX_11 

GPIO11

WIFI_IOT_GPIO_IDX_12 

GPIO12

WIFI_IOT_GPIO_IDX_13 

GPIO13

WIFI_IOT_GPIO_IDX_14 

GPIO14

WIFI_IOT_GPIO_IDX_MAX 

Maximum value

WifiIotGpioIntPolarity

  1. enum [WifiIotGpioIntPolarity]($api-api-LinkIoT-Wifiiot.md#gab81589838cedcc3933bb789c97ad3643)

Description:

Enumerates I/O interrupt polarities.

Enumerator

Description

WIFI_IOT_GPIO_EDGE_FALL_LEVEL_LOW 

Interrupt at a low level or falling edge

WIFI_IOT_GPIO_EDGE_RISE_LEVEL_HIGH 

Interrupt at a high level or rising edge

WifiIotGpioIntType

  1. enum [WifiIotGpioIntType]($api-api-LinkIoT-Wifiiot.md#gac8eb8ad448903ed52c96ccc675e81f94)

Description:

Enumerates GPIO interrupt trigger modes.

Enumerator

Description

WIFI_IOT_INT_TYPE_LEVEL 

Level-sensitive interrupt

WIFI_IOT_INT_TYPE_EDGE 

Edge-sensitive interrupt

WifiIotGpioValue

  1. enum [WifiIotGpioValue]($api-api-LinkIoT-Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b)

Description:

Enumerates GPIO level values.

Enumerator

Description

WIFI_IOT_GPIO_VALUE0 

Low GPIO level

WIFI_IOT_GPIO_VALUE1 

High GPIO level

WifiIotI2cIdx

  1. enum [WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8)

Description:

Enumerates I2C hardware indexes.

Enumerator

Description

WIFI_IOT_I2C_IDX_0 

I2C hardware index 0

WIFI_IOT_I2C_IDX_1 

I2C hardware index 1

WifiIotI2sResolution

  1. enum [WifiIotI2sResolution]($api-api-LinkIoT-Wifiiot.md#gac024b870d63e802d8119e88a82953807)

Description:

Enumerates I2S resolution.

Enumerator

Description

WIFI_IOT_I2S_RESOLUTION_16BIT 

16-bit resolution

WIFI_IOT_I2S_RESOLUTION_24BIT 

24-bit resolution

WifiIotI2sSampleRate

  1. enum [WifiIotI2sSampleRate]($api-api-LinkIoT-Wifiiot.md#ga5e124d70b18cf4cff40bcce78445f689)

Description:

Enumerates I2S sampling rates.

Enumerator

Description

WIFI_IOT_I2S_SAMPLE_RATE_8K 

8K sampling rate

WIFI_IOT_I2S_SAMPLE_RATE_16K 

16K sampling rate

WIFI_IOT_I2S_SAMPLE_RATE_32K 

32K sampling rate

WIFI_IOT_I2S_SAMPLE_RATE_48K 

48K sampling rate

WifiIotIoDriverStrength

  1. enum [WifiIotIoDriverStrength]($api-api-LinkIoT-Wifiiot.md#gae97ab4109f511ceeee889dba9e79a968)

Description:

Enumerates I/O driver strength levels.

Enumerator

Description

WIFI_IOT_IO_DRIVER_STRENGTH_0 

Driver strength level 0 (highest)

WIFI_IOT_IO_DRIVER_STRENGTH_1 

Driver strength level 1

WIFI_IOT_IO_DRIVER_STRENGTH_2 

Driver strength level 2

WIFI_IOT_IO_DRIVER_STRENGTH_3 

Driver strength level 3

WIFI_IOT_IO_DRIVER_STRENGTH_4 

Driver strength level 4

WIFI_IOT_IO_DRIVER_STRENGTH_5 

Driver strength level 5

WIFI_IOT_IO_DRIVER_STRENGTH_6 

Driver strength level 6

WIFI_IOT_IO_DRIVER_STRENGTH_7 

Driver strength level 7 (lowest)

WIFI_IOT_IO_DRIVER_STRENGTH_MAX 

Maximum value

WifiIotIoFuncGpio0

  1. enum [WifiIotIoFuncGpio0]($api-api-LinkIoT-Wifiiot.md#ga2b08eb2a302e2c4fa216a1373bea4a01)

Description:

Enumerates the functions of GPIO hardware pin 0.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_0_GPIO 

GPIO0 function

WIFI_IOT_IO_FUNC_GPIO_0_UART1_TXD 

Functions of UART1 TXD

WIFI_IOT_IO_FUNC_GPIO_0_SPI1_CK 

SPI1 CK function

WIFI_IOT_IO_FUNC_GPIO_0_JTAG_TDO 

Functions of JTAG TD0

WIFI_IOT_IO_FUNC_GPIO_0_PWM3_OUT 

PWM3 OUT function

WIFI_IOT_IO_FUNC_GPIO_0_I2C1_SDA 

I2C1 SDA function

WifiIotIoFuncGpio10

  1. enum [WifiIotIoFuncGpio10]($api-api-LinkIoT-Wifiiot.md#gad4670688ad729f40424bccfeb1afc3b2)

Description:

Enumerates the functions of GPIO hardware pin 10.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_10_GPIO 

GPIO10 function

WIFI_IOT_IO_FUNC_GPIO_10_I2C0_SDA 

I2C0 SDA function

WIFI_IOT_IO_FUNC_GPIO_10_UART2_CTS_N 

UART2 CTS function

WIFI_IOT_IO_FUNC_GPIO_10_SDIO_D3 

SDIO D3 function

WIFI_IOT_IO_FUNC_GPIO_10_SPI0_CK 

SPI0 CK function

WIFI_IOT_IO_FUNC_GPIO_10_PWM1_OUT 

PWM1 OUT function

WIFI_IOT_IO_FUNC_GPIO_10_I2S0_TX 

I2S0 TX function

WifiIotIoFuncGpio11

  1. enum [WifiIotIoFuncGpio11]($api-api-LinkIoT-Wifiiot.md#ga5099248aa82355e85ba5a6227f2ab1a7)

Description:

Enumerates the functions of GPIO hardware pin 11.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_11_GPIO 

GPIO11 function

WIFI_IOT_IO_FUNC_GPIO_11_UART2_TXD 

UART2 TXD function

WIFI_IOT_IO_FUNC_GPIO_11_SDIO_CMD 

SDIO CMD function

WIFI_IOT_IO_FUNC_GPIO_11_SPI0_RXD 

SDIO RXD function

WIFI_IOT_IO_FUNC_GPIO_11_PWM2_OUT 

PWM2 OUT function

WIFI_IOT_IO_FUNC_GPIO_11_RF_TX_EN_EXT 

RF TX_EN_EXT function

WIFI_IOT_IO_FUNC_GPIO_11_I2S0_RX 

I2S0 RX function

WifiIotIoFuncGpio12

  1. enum [WifiIotIoFuncGpio12]($api-api-LinkIoT-Wifiiot.md#gaed0008f886fc864d90f6d1c2ae9677a0)

Description:

Enumerates the functions of GPIO hardware pin 12.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_12_GPIO 

GPIO12 function

WIFI_IOT_IO_FUNC_GPIO_12_UART2_RXD 

SUART2 RXD function

WIFI_IOT_IO_FUNC_GPIO_12_SDIO_CLK 

SDIO CLK function

WIFI_IOT_IO_FUNC_GPIO_12_SPI0_CSN 

SDIO CSN function

WIFI_IOT_IO_FUNC_GPIO_12_PWM3_OUT 

PWM3 OUT function

WIFI_IOT_IO_FUNC_GPIO_12_RF_RX_EN_EXT 

RF RX_EN_EXT function

WIFI_IOT_IO_FUNC_GPIO_12_I2S0_BCLK 

I2S0 BCLK function

WifiIotIoFuncGpio13

  1. enum [WifiIotIoFuncGpio13]($api-api-LinkIoT-Wifiiot.md#ga364b7c7cc88086ad40c4c3d2dd098648)

Description:

Enumerates the functions of GPIO hardware pin 13.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_13_SSI_DATA 

SSI DATA function

WIFI_IOT_IO_FUNC_GPIO_13_UART0_TXD 

UART0 TXD function

WIFI_IOT_IO_FUNC_GPIO_13_UART2_RTS_N 

UART2 RTS function

WIFI_IOT_IO_FUNC_GPIO_13_SDIO_D0 

SDIO D0 function

WIFI_IOT_IO_FUNC_GPIO_13_GPIO 

GPIO13 function

WIFI_IOT_IO_FUNC_GPIO_13_PWM4_OUT 

PWM4 OUT function

WIFI_IOT_IO_FUNC_GPIO_13_I2C0_SDA 

I2C0 SDA function

WIFI_IOT_IO_FUNC_GPIO_13_I2S0_WS 

I2S0 WS function

WifiIotIoFuncGpio14

  1. enum [WifiIotIoFuncGpio14]($api-api-LinkIoT-Wifiiot.md#gafcf6d4cb0113b803d834bac89af8d9b8)

Description:

Enumerates the functions of GPIO hardware pin 14.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_14_SSI_CLK 

SSI CLK function

WIFI_IOT_IO_FUNC_GPIO_14_UART0_RXD 

UART0 RXD function

WIFI_IOT_IO_FUNC_GPIO_14_UART2_CTS_N 

UART2 CTS function

WIFI_IOT_IO_FUNC_GPIO_14_SDIO_D1 

SDIO D1 function

WIFI_IOT_IO_FUNC_GPIO_14_GPIO 

GPIO14 function

WIFI_IOT_IO_FUNC_GPIO_14_PWM5_OUT 

PWM5 OUT function

WIFI_IOT_IO_FUNC_GPIO_14_I2C0_SCL 

I2C0 SCL function

WifiIotIoFuncGpio2

  1. enum [WifiIotIoFuncGpio2]($api-api-LinkIoT-Wifiiot.md#gac9d0974184776d35ca9b0f73829f317b)

Description:

Enumerates the functions of GPIO hardware pin 2.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_2_GPIO 

GPIO2 function

WIFI_IOT_IO_FUNC_GPIO_2_UART1_RTS_N 

UART1 RTS function

WIFI_IOT_IO_FUNC_GPIO_2_SPI1_TXD 

SPI1 TXD function

WIFI_IOT_IO_FUNC_GPIO_2_JTAG_TRSTN 

JTAG TRSTN function

WIFI_IOT_IO_FUNC_GPIO_2_PWM2_OUT 

PWM2 OUT function

WIFI_IOT_IO_FUNC_GPIO_2_SSI_CLK 

SSI CLK function

WifiIotIoFuncGpio3

  1. enum [WifiIotIoFuncGpio3]($api-api-LinkIoT-Wifiiot.md#gaca745c98fc2ef9994e67444c9aa53db8)

Description:

Enumerates the functions of GPIO hardware pin 3.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_3_GPIO 

GPIO3 function

WIFI_IOT_IO_FUNC_GPIO_3_UART0_TXD 

UART0 TXD function

WIFI_IOT_IO_FUNC_GPIO_3_UART1_CTS_N 

UART1 CTS function

WIFI_IOT_IO_FUNC_GPIO_3_SPI1_CSN 

SPI CSN function

WIFI_IOT_IO_FUNC_GPIO_3_JTAG_TDI 

JTAG TDI function

WIFI_IOT_IO_FUNC_GPIO_3_PWM5_OUT 

PWM5 OUT function

WIFI_IOT_IO_FUNC_GPIO_3_I2C1_SDA 

I2C1 SDA function

WIFI_IOT_IO_FUNC_GPIO_3_SSI_DATA 

SSI DATA function

WifiIotIoFuncGpio4

  1. enum [WifiIotIoFuncGpio4]($api-api-LinkIoT-Wifiiot.md#ga70218b6740d703737739ce4372e2f1e2)

Description:

Enumerates the functions of GPIO hardware pin 4.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_4_GPIO 

GPIO4 function

WIFI_IOT_IO_FUNC_GPIO_4_UART0_RXD 

UART0 RXD function

WIFI_IOT_IO_FUNC_GPIO_4_JTAG_TMS 

JTAG TMS function

WIFI_IOT_IO_FUNC_GPIO_4_PWM1_OUT 

PWM1 OUT function

WIFI_IOT_IO_FUNC_GPIO_4_I2C1_SCL 

I2C1 SCL function

WifiIotIoFuncGpio5

  1. enum [WifiIotIoFuncGpio5]($api-api-LinkIoT-Wifiiot.md#ga6cbed71f3a94f8e7513c4b91ae1e54ce)

Description:

Enumerates the functions of GPIO hardware pin 5.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_5_GPIO 

GPIO5 function

WIFI_IOT_IO_FUNC_GPIO_5_UART1_RXD 

UART1 RXD function

WIFI_IOT_IO_FUNC_GPIO_5_SPI0_CSN 

SPI0 CSN function

WIFI_IOT_IO_FUNC_GPIO_5_PWM2_OUT 

PWM2 OUT function

WIFI_IOT_IO_FUNC_GPIO_5_I2S0_MCLK 

I2C0 MCLK function

WIFI_IOT_IO_FUNC_GPIO_5_BT_STATUS 

BT STATUS function

WifiIotIoFuncGpio6

  1. enum [WifiIotIoFuncGpio6]($api-api-LinkIoT-Wifiiot.md#ga42008386d7791b97dbfa1fa6b6c4dc1d)

Description:

Enumerates the functions of GPIO hardware pin 6.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_6_GPIO 

GPIO6 function

WIFI_IOT_IO_FUNC_GPIO_6_UART1_TXD 

UART1 TXD function

WIFI_IOT_IO_FUNC_GPIO_6_SPI0_CK 

SPI0 CK function

WIFI_IOT_IO_FUNC_GPIO_6_PWM3_OUT 

PWM3 OUT function

WIFI_IOT_IO_FUNC_GPIO_6_I2S0_TX 

I2S0 TX function

WIFI_IOT_IO_FUNC_GPIO_6_COEX_SWITCH 

COEX switch function

WifiIotIoFuncGpio7

  1. enum [WifiIotIoFuncGpio7]($api-api-LinkIoT-Wifiiot.md#gac66dc390f39e0933c051790b20552b7c)

Description:

Enumerates the functions of GPIO hardware pin 7.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_7_GPIO 

GPIO7 function

WIFI_IOT_IO_FUNC_GPIO_7_UART1_CTS_N 

UART1 CTS function

WIFI_IOT_IO_FUNC_GPIO_7_SPI0_RXD 

SPI0 RXD function

WIFI_IOT_IO_FUNC_GPIO_7_PWM0_OUT 

PWM0 OUT function

WIFI_IOT_IO_FUNC_GPIO_7_I2S0_BCLK 

I2S0 BCLK function

WIFI_IOT_IO_FUNC_GPIO_7_BT_ACTIVE 

BT ACTIVE function

WifiIotIoFuncGpio8

  1. enum [WifiIotIoFuncGpio8]($api-api-LinkIoT-Wifiiot.md#gae63cd3d5c677fac3b01a3c67e8faf0fb)

Description:

Enumerates the functions of GPIO hardware pin 8.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_8_GPIO 

GPIO8 function

WIFI_IOT_IO_FUNC_GPIO_8_UART1_RTS_N 

UART1 RTS function

WIFI_IOT_IO_FUNC_GPIO_8_SPI0_TXD 

SPI0 TXD function

WIFI_IOT_IO_FUNC_GPIO_8_PWM1_OUT 

PWM1 OUT function

WIFI_IOT_IO_FUNC_GPIO_8_I2S0_WS 

I2S0 WS function

WIFI_IOT_IO_FUNC_GPIO_8_WLAN_ACTIVE 

WLAN ACTIVE function

WifiIotIoFuncGpio9

  1. enum [WifiIotIoFuncGpio9]($api-api-LinkIoT-Wifiiot.md#ga641da9889bd5a8a758e1a4eb2a5a19e4)

Description:

Enumerates the functions of GPIO hardware pin 9.

Enumerator

Description

WIFI_IOT_IO_FUNC_GPIO_9_GPIO 

GPIO9 function

WIFI_IOT_IO_FUNC_GPIO_9_I2C0_SCL 

I2C0 SCL function

WIFI_IOT_IO_FUNC_GPIO_9_UART2_RTS_N 

UART2 RTS function

WIFI_IOT_IO_FUNC_GPIO_9_SDIO_D2 

SDIO D2 function

WIFI_IOT_IO_FUNC_GPIO_9_SPI0_TXD 

SPI0 TXD function

WIFI_IOT_IO_FUNC_GPIO_9_PWM0_OUT 

PWM0 OUT function

WIFI_IOT_IO_FUNC_GPIO_9_I2S0_MCLK 

I2S0 MCLK function

WifiIotIoName

  1. enum [WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415)

Description:

Enumerates GPIO hardware pin IDs.

Enumerator

Description

WIFI_IOT_IO_NAME_GPIO_0 

GPIO hardware pin 0

WIFI_IOT_IO_NAME_GPIO_1 

GPIO hardware pin 1

WIFI_IOT_IO_NAME_GPIO_2 

GPIO hardware pin 2

WIFI_IOT_IO_NAME_GPIO_3 

GPIO hardware pin 3

WIFI_IOT_IO_NAME_GPIO_4 

GPIO hardware pin 4

WIFI_IOT_IO_NAME_GPIO_5 

GPIO hardware pin 5

WIFI_IOT_IO_NAME_GPIO_6 

GPIO hardware pin 6

WIFI_IOT_IO_NAME_GPIO_7 

GPIO hardware pin 7

WIFI_IOT_IO_NAME_GPIO_8 

GPIO hardware pin 8

WIFI_IOT_IO_NAME_GPIO_9 

GPIO hardware pin 9

WIFI_IOT_IO_NAME_GPIO_10 

GPIO hardware pin 10

WIFI_IOT_IO_NAME_GPIO_11 

GPIO hardware pin 11

WIFI_IOT_IO_NAME_GPIO_12 

GPIO hardware pin 12

WIFI_IOT_IO_NAME_GPIO_13 

GPIO hardware pin 13

WIFI_IOT_IO_NAME_GPIO_14 

GPIO hardware pin 14

WIFI_IOT_IO_NAME_MAX 

Maximum value

WifiIotIoPull

  1. enum [WifiIotIoPull]($api-api-LinkIoT-Wifiiot.md#gacc20a5c6456ec381ed931232c29d1c4f)

Description:

Enumerates GPIO pull-up or pull-down settings.

Enumerator

Description

WIFI_IOT_IO_PULL_NONE 

No pull

WIFI_IOT_IO_PULL_UP 

Pull-up

WIFI_IOT_IO_PULL_DOWN 

Pull-down

WIFI_IOT_IO_PULL_MAX 

Maximum value

WifiIotPwmClkSource

  1. enum [WifiIotPwmClkSource]($api-api-LinkIoT-Wifiiot.md#ga2ecbd0ab9636fedd354de7447056df29)

Description:

Enumerates PWM clock sources.

Enumerator

Description

WIFI_IOT_PWM_CLK_160M 

160 MHz working clock

WIFI_IOT_PWM_CLK_XTAL 

24 MHz or 40 MHz external crystal

WIFI_IOT_PWM_CLK_MAX 

Maximum value

WifiIotPwmPort

  1. enum [WifiIotPwmPort]($api-api-LinkIoT-Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7)

Description:

Enumerates PWM ports.

Enumerator

Description

WIFI_IOT_PWM_PORT_PWM0 

PWM0

WIFI_IOT_PWM_PORT_PWM1 

PWM1

WIFI_IOT_PWM_PORT_PWM2 

PWM2

WIFI_IOT_PWM_PORT_PWM3 

PWM3

WIFI_IOT_PWM_PORT_PWM4 

PWM4

WIFI_IOT_PWM_PORT_PWM5 

PWM5

WIFI_IOT_PWM_PORT_MAX 

Maximum value

WifiIotSpiCfgClockCpha

  1. enum [WifiIotSpiCfgClockCpha]($api-api-LinkIoT-Wifiiot.md#ga1eb13cffbbdec9da1d57c766763b94e5)

Description:

Enumerates communication phases.

Enumerator

Description

WIFI_IOT_SPI_CFG_CLOCK_CPHA_0 

Phase 0

WIFI_IOT_SPI_CFG_CLOCK_CPHA_1 

Phase 1

WifiIotSpiCfgClockCpol

  1. enum [WifiIotSpiCfgClockCpol]($api-api-LinkIoT-Wifiiot.md#gad6674c8b0989b6a329d5fd5ff0d5d750)

Description:

Enumerates communication polarities.

Enumerator

Description

WIFI_IOT_SPI_CFG_CLOCK_CPOL_0 

Polarity 0

WIFI_IOT_SPI_CFG_CLOCK_CPOL_1 

Polarity 1

WifiIotSpiCfgDataWidth

  1. enum [WifiIotSpiCfgDataWidth]($api-api-LinkIoT-Wifiiot.md#ga6f2e44db2698c33b81bd6caa438a55ea)

Description:

Enumerates the communication data width, that is, the number of valid bits in each frame.

Enumerator

Description

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_4BIT 

4 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_5BIT 

5 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_6BIT 

6 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_7BIT 

7 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_8BIT 

8 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_9BIT 

9 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_10BIT 

10 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_11BIT 

11 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_12BIT 

12 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_13BIT 

13 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_14BIT 

14 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_15BIT 

15 bits

WIFI_IOT_SPI_CFG_DATA_WIDTH_E_16BIT 

16 bits

WifiIotSpiCfgEndian

  1. enum [WifiIotSpiCfgEndian]($api-api-LinkIoT-Wifiiot.md#ga31924085df23a024413fa6e63e13c41e)

Description:

Enumerates the endian mode of each frame.

Enumerator

Description

WIFI_IOT_SPI_CFG_ENDIAN_LITTLE 

Little-endian

WIFI_IOT_SPI_CFG_ENDIAN_BIG 

Big-endian

WifiIotSpiCfgFramMode

  1. enum [WifiIotSpiCfgFramMode]($api-api-LinkIoT-Wifiiot.md#gaef7c192e049db14e2326c0bfba181670)

Description:

Enumerates communication protocols.

Enumerator

Description

WIFI_IOT_SPI_CFG_FRAM_MODE_MOTOROLA 

Motorola protocol

WIFI_IOT_SPI_CFG_FRAM_MODE_TI 

Texas Instruments protocol

WIFI_IOT_SPI_CFG_FRAM_MODE_MICROWIRE 

Microwire protocol

WifiIotSpiIdx

  1. enum [WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b)

Description:

Enumerates SPI channel IDs.

Enumerator

Description

WIFI_IOT_SPI_ID_0 

Channel 0

WIFI_IOT_SPI_ID_1 

Channel 1

WifiIotUartBlockState

  1. enum [WifiIotUartBlockState]($api-api-LinkIoT-Wifiiot.md#ga93f35a58dc54e29d4892d1e94179c72d)

Description:

Enumerates UART block states.

Enumerator

Description

WIFI_IOT_UART_BLOCK_STATE_NONE_BLOCK 

Block disabled

WIFI_IOT_UART_BLOCK_STATE_BLOCK 

Block enabled

WifiIotUartDmaState

  1. enum [WifiIotUartDmaState]($api-api-LinkIoT-Wifiiot.md#gaf36ed6a640d85e79dfee020131e0d86f)

Description:

Enumerates UART DMA states.

Enumerator

Description

WIFI_IOT_UART_NONE_DMA 

DMA disabled

WIFI_IOT_UART_USE_DMA 

DMA enabled

WifiIotUartFifoLine

  1. enum [WifiIotUartFifoLine]($api-api-LinkIoT-Wifiiot.md#ga1c15f86994b472d35bee5d6b57d42a49)

Description:

Enumerates UART FIFO interrupt thresholds.

Enumerator

Description

WIFI_IOT_FIFO_LINE_ONE_EIGHT 

FIFO = 1/8 full

WIFI_IOT_FIFO_LINE_ONE_QUARTER 

FIFO = 1/4 full

WIFI_IOT_FIFO_LINE_HALF 

FIFO = 1/2 full

WIFI_IOT_FIFO_LINE_THREE_QUARTERS 

FIFO = 3/4 full

WIFI_IOT_FIFO_LINE_SEVEN_EIGHTS 

FIFO = 7/8 full

WifiIotUartIdx

  1. enum [WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44)

Description:

Enumerates the UART serial number.

Enumerator

Description

WIFI_IOT_UART_IDX_0 

Physical port 0

WIFI_IOT_UART_IDX_1 

Physical port 1

WIFI_IOT_UART_IDX_2 

Physical port 2

WIFI_IOT_UART_IDX_MAX 

Maximum value

WifiIotUartIdxDataBit

  1. enum [WifiIotUartIdxDataBit]($api-api-LinkIoT-Wifiiot.md#gafdf1adfc0e0ed18282aa3006300b12b4)

Description:

Enumerates the number of UART data bits.

Enumerator

Description

WIFI_IOT_UART_DATA_BIT_5 

5 data bits

WIFI_IOT_UART_DATA_BIT_6 

6 data bits

WIFI_IOT_UART_DATA_BIT_7 

7 data bits

WIFI_IOT_UART_DATA_BIT_8 

8 data bits

WifiIotUartParity

  1. enum [WifiIotUartParity]($api-api-LinkIoT-Wifiiot.md#ga9cee98ab295d2e42ab7f0fb614268602)

Description:

Enumerates the UART parity bit.

Enumerator

Description

WIFI_IOT_UART_PARITY_NONE 

No parity

WIFI_IOT_UART_PARITY_ODD 

Odd parity

WIFI_IOT_UART_PARITY_EVEN 

Even parity

WifiIotUartStopBit

  1. enum [WifiIotUartStopBit]($api-api-LinkIoT-Wifiiot.md#gab0a1b43e8e98b028717e6557003b3172)

Description:

Enumerates the number of UART stop bits.

Enumerator

Description

WIFI_IOT_UART_STOP_BIT_1 

1 stop bit

WIFI_IOT_UART_STOP_BIT_2 

2 stop bit

Function Documentation

AdcRead()

  1. unsigned int AdcRead ([WifiIotAdcChannelIndex]($api-api-LinkIoT-Wifiiot.md#ga4c8b663163c7b23071914947a2bca73b) channel, unsigned short * data, [WifiIotAdcEquModelSel]($api-api-LinkIoT-Wifiiot.md#gafb9992ebf1655f994dc56883c8fe4b2e) equModel, [WifiIotAdcCurBais]($api-api-LinkIoT-Wifiiot.md#gaac161eb7075f815f6d39a63615bfa82d) curBais, unsigned short rstCnt )

Description:

Reads a piece of sampled data from a specified ADC channel based on the input parameters.

Parameters:

Name

Description

channel Indicates the ADC channel index.
data Indicates the pointer to the address for storing the read data.
equModel Indicates the equation model.
curBais Indicates the analog power control mode.
rstCnt Indicates the count of the time from reset to conversion start. One count is equal to 334 ns. The value must range from 0 to 0xFF0.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

AtCheckUartBusy()

  1. void AtCheckUartBusy (unsigned char enable)

Description:

Sets whether to check the UART busy status during low-power voting.

This function determines whether to check the UART status before the device enters the low-power mode. If enable is set to 1 and the UART is found to be busy, the device does not enter the low-power mode. In other scenarios, the device enters the low-power mode.

Parameters:

Name

Description

enable Specifies whether to check the UART busy status. The value 1 means to check the UART busy status, and 0 means not to check the busy status.

AtInit()

  1. unsigned int AtInit (void )

Description:

Initializes an AT command task.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

AtPrintf()

  1. int AtPrintf (const char * fmt, ... )

Description:

Formats data and outputs it to the AT command terminal.

Parameters:

Name

Description

fmt Indicates the pointer to the control character string to format.
Represents a variable parameter list in the character string format.

Returns:

Returns the number of bytes (excluding the end character) output to the AT command terminal if the operation is successful; returns -1 otherwise.

AtRegisterCmd()

  1. unsigned int AtRegisterCmd (const [AtCmdTbl]($api-api-LinkIoT-AtCmdTbl.md) * cmdTbl, unsigned short cmdNum )

Description:

Registers a certain number of AT commands.

Parameters:

Name

Description

cmdTbl Indicates the command table.
cmdNum Indicates the number of AT commands in the command table.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

AtSysCmdRegister()

  1. void AtSysCmdRegister (void )

Description:

Registers a system AT command.

For example, you can use this function to register the AT+RST command, which is a system AT command used to reset a device.

FlashDeinit()

  1. unsigned int FlashDeinit (void )

Description:

Deinitializes the flash device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

FlashErase()

  1. unsigned int FlashErase (const unsigned int flashOffset, const unsigned int size )

Description:

Erases data in a specified flash memory address.

Parameters:

Name

Description

flashOffset Indicates the address of the flash memory data to erase.
size Indicates the length of the data to erase, in bytes. The value must be a multiple of 4000 bytes.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

FlashInit()

  1. unsigned int FlashInit (void )

Description:

Initializes the flash device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

FlashIoctl()

  1. unsigned int FlashIoctl (unsigned short cmd, char * data )

Description:

Obtains flash information based on a specific command.

Parameters:

Name

Description

cmd Indicates the command ID. The value 0 indicates an attempt to obtain flash partition information, and 1 indicates an attempt to obtain the flash busy status.
data Indicates the pointer to the memory where the obtained information will be saved.

Returns:

Returns WIFI_IOT_SUCCESS if the flash information is obtained; returns an error code defined in wifiiot_errno.h otherwise.

FlashPartitionInit()

  1. unsigned int FlashPartitionInit (void )

Description:

Initializes a flash partition.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

FlashRead()

  1. unsigned int FlashRead (const unsigned int flashOffset, const unsigned int size, unsigned char * ramData )

Description:

Reads data from a flash memory address.

This function reads a specified length of data from a specified flash memory address.

Parameters:

Name

Description

flashOffset Indicates the address of the flash memory from which data is to read.
size Indicates the length of the data to read.
ramData Indicates the pointer to the RAM for storing the read data.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

FlashWrite()

  1. unsigned int FlashWrite (const unsigned int flashOffset, unsigned int size, const unsigned char * ramData, unsigned char doErase )

Description:

Writes data to a flash memory address.

This function writes a specified length of data to a specified flash memory address.

Parameters:

Name

Description

flashOffset Indicates the address of the flash memory to which data is to write.
size Indicates the length of the data to write.
ramData Indicates the pointer to the RAM for storing the data to write.
doErase Indicates whether to automatically erase and overwrite the data.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GetPartitionTable()

  1. [WifiIotFlashPartitionTable]($api-api-LinkIoT-WifiIotFlashPartitionTable.md)* GetPartitionTable (void )

Description:

Obtains a flash partition table.

Returns:

Returns the pointer to the partition table.

GpioDeinit()

  1. unsigned int GpioDeinit (void )

Description:

Deinitializes the GPIO device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioGetDir()

  1. unsigned int GpioGetDir ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioDir]($api-api-LinkIoT-Wifiiot.md#gab4b1fb50c758d491ba297a65e1c7a70a) * dir )

Description:

Obtains the direction for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
dir Indicates the pointer to the GPIO input/output direction.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioGetInputVal()

  1. unsigned int GpioGetInputVal ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioValue]($api-api-LinkIoT-Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) * val )

Description:

Obtains the input level value of a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
val Indicates the pointer to the input level value.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioGetOutputVal()

  1. unsigned int GpioGetOutputVal ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioValue]($api-api-LinkIoT-Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) * val )

Description:

Obtains the output level value of a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
val Indicates the pointer to the output level value.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioInit()

  1. unsigned int GpioInit (void )

Description:

Initializes the GPIO device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioRegisterIsrFunc()

  1. unsigned int GpioRegisterIsrFunc ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioIntType]($api-api-LinkIoT-Wifiiot.md#gac8eb8ad448903ed52c96ccc675e81f94) intType, [WifiIotGpioIntPolarity]($api-api-LinkIoT-Wifiiot.md#gab81589838cedcc3933bb789c97ad3643) intPolarity, [GpioIsrCallbackFunc]($api-api-LinkIoT-Wifiiot.md#ga93120443d8150e18701ce6d3dd290408) func, char * arg )

Description:

Enables the interrupt function for a GPIO pin.

This function can be used to set the interrupt type, interrupt polarity, and interrupt callback for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
intType Indicates the interrupt type.
intPolarity Indicates the interrupt polarity.
func Indicates the interrupt callback function.
arg Indicates the pointer to the argument used in the interrupt callback function.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioSetDir()

  1. unsigned int GpioSetDir ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioDir]($api-api-LinkIoT-Wifiiot.md#gab4b1fb50c758d491ba297a65e1c7a70a) dir )

Description:

Sets the direction for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
dir Indicates the GPIO input/output direction.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioSetIsrMask()

  1. unsigned int GpioSetIsrMask ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, unsigned char mask )

Description:

Masks the interrupt function for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
mask Indicates whether the interrupt function is masked. The value 1 means to mask the interrupt function, and 0 means not to mask the interrupt function.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioSetIsrMode()

  1. unsigned int GpioSetIsrMode ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioIntType]($api-api-LinkIoT-Wifiiot.md#gac8eb8ad448903ed52c96ccc675e81f94) intType, [WifiIotGpioIntPolarity]($api-api-LinkIoT-Wifiiot.md#gab81589838cedcc3933bb789c97ad3643) intPolarity )

Description:

Sets the interrupt trigger mode of a GPIO pin.

This function configures a GPIO pin based on the interrupt type and interrupt polarity.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
intType Indicates the interrupt type.
intPolarity Indicates the interrupt polarity.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioSetOutputVal()

  1. unsigned int GpioSetOutputVal ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id, [WifiIotGpioValue]($api-api-LinkIoT-Wifiiot.md#gac9095d1db72e5046b2ec1895aaec0e6b) val )

Description:

Sets the output level value for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.
val Indicates the output level value.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

GpioUnregisterIsrFunc()

  1. unsigned int GpioUnregisterIsrFunc ([WifiIotGpioIdx]($api-api-LinkIoT-Wifiiot.md#gacb21f234cf149161f1f95f3330eeb8e7) id)

Description:

Disables the interrupt function for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin ID.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2cDeinit()

  1. unsigned int I2cDeinit ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id)

Description:

Deinitializes an I2C device.

Parameters:

Name

Description

id Indicates the I2C device ID.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2cInit()

  1. unsigned int I2cInit ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned int baudrate )

Description:

Initializes an I2C device with a specified baud rate.

Parameters:

Name

Description

id Indicates the I2C device ID.
baudrate Indicates the I2C baud rate.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2cRead()

  1. unsigned int I2cRead ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned short deviceAddr, const [WifiIotI2cData]($api-api-LinkIoT-WifiIotI2cData.md) * i2cData )

Description:

Reads data from an I2C device.

The data read will be saved to the address specified by i2cData.

Parameters:

Name

Description

id Indicates the I2C device ID.
deviceAddr Indicates the I2C device address.
i2cData Indicates the pointer to the data descriptor to read.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2cRegisterResetBusFunc()

  1. void I2cRegisterResetBusFunc ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, [WifiIotI2cFunc]($api-api-LinkIoT-WifiIotI2cFunc.md) pfn )

Description:

Registers an I2C callback.

Parameters:

Name

Description

id Indicates the I2C device ID.
pfn Indicates the type of the callback to register.

I2cSetBaudrate()

  1. unsigned int I2cSetBaudrate ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned int baudrate )

Description:

Sets the baud rate for an I2C device.

Parameters:

Name

Description

id Indicates the I2C device ID.
baudrate Indicates the I2C baud rate to set.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2cWrite()

  1. unsigned int I2cWrite ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned short deviceAddr, const [WifiIotI2cData]($api-api-LinkIoT-WifiIotI2cData.md) * i2cData )

Description:

Writes data to an I2C device.

Parameters:

Name

Description

id Indicates the I2C device ID.
deviceAddr Indicates the I2C device address.
i2cData Indicates the pointer to the data descriptor to write.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2cWriteread()

  1. unsigned int I2cWriteread ([WifiIotI2cIdx]($api-api-LinkIoT-Wifiiot.md#gaeeb58e02e3783d02e1ed4bad313cc0b8) id, unsigned short deviceAddr, const [WifiIotI2cData]($api-api-LinkIoT-WifiIotI2cData.md) * i2cData )

Description:

Sends data to and receives data responses from an I2C device.

Parameters:

Name

Description

id Indicates the I2C device ID.
deviceAddr Indicates the I2C device address.
i2cData Indicates the pointer to the device descriptor of the data to receive.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2sDeinit()

  1. unsigned int I2sDeinit (void )

Description:

Deinitializes the I2S device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2sInit()

  1. unsigned int I2sInit (const [WifiIotI2sAttribute]($api-api-LinkIoT-WifiIotI2sAttribute.md) * i2sAttribute)

Description:

Initializes the I2S device.

Parameters:

Name

Description

i2sAttribute Indicates the pointer to the I2S configuration parameter.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2sRead()

  1. unsigned int I2sRead (unsigned char * rdData, unsigned int rdLen, unsigned int timeOutMs )

Description:

Reads data from the I2S device.

This function reads data with the length specified by rdLen from an I2S device within the duration specified by timeOutMs.

Parameters:

Name

Description

rdData Indicates the pointer to the data to read.
rdLen Indicates the length of the data to read.
timeOutMs Indicates the timeout interval.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

I2sWrite()

  1. unsigned int I2sWrite (unsigned char * wrData, unsigned int wrLen, unsigned int timeOutMs )

Description:

Writes data to the I2S device.

This function writes data with the length specified by wrLen to an I2S device within the duration specified by timeOutMs.

Parameters:

Name

Description

wrData Indicates the pointer to the data to write.
wrLen Indicates the length of the data to write.
timeOutMs Indicates the timeout interval.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

IOGetDriverStrength()

  1. unsigned int IOGetDriverStrength ([WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoDriverStrength]($api-api-LinkIoT-Wifiiot.md#gae97ab4109f511ceeee889dba9e79a968) * val )

Description:

Obtains the driver strength of a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin.
val Indicates the pointer to the address where the I/O driver strength level is to be stored.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

IoGetFunc()

  1. unsigned int IoGetFunc ([WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, unsigned char * val )

Description:

Obtains the multiplexing function for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin.
val Indicates the pointer to the address whether I/O multiplexing function is to be stored. For example, if the value of id is WIFI_IOT_IO_NAME_GPIO_0, the value type of val is WifiIotIoFuncGpio0. If the value of id is WIFI_IOT_IO_NAME_GPIO_1, the value type of val is WifiIotIoFuncGpio1. The same rule applies to other values.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

IoGetPull()

  1. unsigned int IoGetPull ([WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoPull]($api-api-LinkIoT-Wifiiot.md#gacc20a5c6456ec381ed931232c29d1c4f) * val )

Description:

Obtains the pull type of a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin.
val Indicates the pointer to the address where the pull type is to be stored.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

IOSetDriverStrength()

  1. unsigned int IOSetDriverStrength ([WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoDriverStrength]($api-api-LinkIoT-Wifiiot.md#gae97ab4109f511ceeee889dba9e79a968) val )

Description:

Sets the driver strength of a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin.
val Indicates the I/O driver strength level obtained.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

IoSetFunc()

  1. unsigned int IoSetFunc ([WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, unsigned char val )

Description:

Sets the multiplexing function for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin.
val Indicates the I/O multiplexing function. For example, if the value of id is WIFI_IOT_IO_NAME_GPIO_0, the value type of val is WifiIotIoFuncGpio0. If the value of id is WIFI_IOT_IO_NAME_GPIO_1, the value type of val is WifiIotIoFuncGpio1. The same rule applies to other values.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

IoSetPull()

  1. unsigned int IoSetPull ([WifiIotIoName]($api-api-LinkIoT-Wifiiot.md#ga2f42c70f1dd8a04746e30a97b3dfc415) id, [WifiIotIoPull]($api-api-LinkIoT-Wifiiot.md#gacc20a5c6456ec381ed931232c29d1c4f) val )

Description:

Sets the pull for a GPIO pin.

Parameters:

Name

Description

id Indicates the GPIO pin.
val Indicates the pull-up or pull-down to set.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

KalThreadRegisterIdleCallback()

  1. void KalThreadRegisterIdleCallback ([TickIdleKalCallback]($api-api-LinkIoT-Wifiiot.md#ga8be54bbf12f538188db10aaaf4bdbdf9) cb)

Description:

Registers the idle task callback.

Parameters:

Name

Description

cb Indicates the idle task callback to register.

KalTickRegisterCallback()

  1. void KalTickRegisterCallback ([TickIdleKalCallback]($api-api-LinkIoT-Wifiiot.md#ga8be54bbf12f538188db10aaaf4bdbdf9) cb)

Description:

Registers the CPU tick callback.

Parameters:

Name

Description

cb Indicates the CPU tick callback to register.

PwmDeinit()

  1. unsigned int PwmDeinit ([WifiIotPwmPort]($api-api-LinkIoT-Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port)

Description:

Deinitializes a PWM device.

Parameters:

Name

Description

port Indicates the PWM port number.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; eturns an error code defined in wifiiot_errno.h otherwise.

PwmInit()

  1. unsigned int PwmInit ([WifiIotPwmPort]($api-api-LinkIoT-Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port)

Description:

Initializes a PWM device.

Parameters:

Name

Description

port Indicates the PWM port number.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

PwmStart()

  1. unsigned int PwmStart ([WifiIotPwmPort]($api-api-LinkIoT-Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port, unsigned short duty, unsigned short freq )

Description:

Outputs PWM signals based on the input parameters.

This function outputs PWM signals from a specified port based on the configured frequency division multiple and duty cycle.

Parameters:

Name

Description

port Indicates the PWM port number.
duty Indicates the PWM duty cycle.
freq Indicates the frequency-division multiple.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

PwmStop()

  1. unsigned int PwmStop ([WifiIotPwmPort]($api-api-LinkIoT-Wifiiot.md#gab3518ce878df4a40d614e88a6f81dea7) port)

Description:

Stops the PWM signal output.

Parameters:

Name

Description

port Indicates the PWM port number.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioCompleteSend()

  1. unsigned int SdioCompleteSend (unsigned char * admaTable, unsigned int admaIndex )

Description:

Completes data sending on the SDIO device.

After data sending is complete, the SDIO device sets a complete flag for the ADMA ID admaIndex to indicate that the ADMA data between channel 0 and the complete flag is set.

Parameters:

Name

Description

admaTable Indicates the pointer to the start address of the ADMA table. Each ADMA table occupies 8 bytes.
admaIndex Indicates the ADMA ID, ranging from 0 to 130.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioGetExtendInfo()

  1. [WifiIotSdioExtendFunc]($api-api-LinkIoT-WifiIotSdioExtendFunc.md)* SdioGetExtendInfo (void )

Description:

Obtains the extended configuration.

Returns:

Returns the pointer to the address of the extended configuration.

SdioInit()

  1. unsigned int SdioInit (void )

Description:

Initializes the SDIO device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioIsPendingMsg()

  1. unsigned int SdioIsPendingMsg (unsigned int msg)

Description:

Checks whether a specified message is suspended.

Parameters:

Name

Description

msg Indicates the ID of the message to check, ranging from 0 to 31.

Returns:

Returns 1 if the message is suspended; returns 0 otherwise.

SdioIsSendingMsg()

  1. unsigned int SdioIsSendingMsg (unsigned int msg)

Description:

Checks whether a specified message is being sent.

Parameters:

Name

Description

msg Indicates the ID of the message to check, ranging from 0 to 31.

Returns:

Returns 1 if the message is being sent; returns 0 otherwise.

SdioProcessMsg()

  1. unsigned int SdioProcessMsg (unsigned int sendMsg, unsigned int clearMsg )

Description:

Clears a specified suspended message in the message queue, adds a new message to it, and sends the new message.

Parameters:

Name

Description

sendMsg Indicates the ID of the message to send, ranging from 0 to 31.
clearMsg Indicates the ID of the message to clear, ranging from 0 to 31.

Returns:

Returns 1 if the operation is successful; returns 0 otherwise.

SdioRegisterCallback()

  1. unsigned int SdioRegisterCallback (const [WifiIotSdioIntcallback]($api-api-LinkIoT-WifiIotSdioIntcallback.md) * callbackFunc)

Description:

Registers an interrupt callback for the SDIO device.

Parameters:

Name

Description

callbackFunc Indicates the pointer to the interrupt callback to register.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioRegisterNotifyMessageCallback()

  1. void SdioRegisterNotifyMessageCallback ([NotifyHostMessageEvent]($api-api-LinkIoT-Wifiiot.md#ga133bb67c0fa6e9dcab35f00edff68e58) msgEventCallback)

Description:

Registers the callback that will be invoked when the host sends a message or data.

Parameters:

Name

Description

msgEventCallback Indicates the callback to be invoked when a message or data is sent.

SdioReinit()

  1. unsigned int SdioReinit (void )

Description:

Reinitializes the SDIO device.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioSchedMsg()

  1. unsigned int SdioSchedMsg (void )

Description:

Sends a suspended SDIO message.

Returns:

Returns 1 if no message is suspended or the suspended message is successfully sent; returns 0 if the SDIO device is not working or is sending messages.

SdioSendData()

  1. void SdioSendData (unsigned int xferBytes)

Description:

Starts to send data.

Data with the length specified by xferBytes is ready for transmission.

Parameters:

Name

Description

xferBytes Indicates the length of the data to send.

SdioSendMsgAck()

  1. unsigned int SdioSendMsgAck (unsigned int msg)

Description:

Sends a specified message.

Parameters:

Name

Description

msg Indicates the ID of the message to send, ranging from 0 to 31.

Returns:

Returns 1 if the operation is successful; returns 0 otherwise.

SdioSendSyncMsg()

  1. unsigned int SdioSendSyncMsg (unsigned int msg)

Description:

Adds a message to a message queue and sends the message.

Parameters:

Name

Description

msg Indicates the ID of the message to add to the message queue and send, ranging from 0 to 31.

Returns:

Returns 1 if the operation is successful; returns 0 otherwise.

SdioSetAdmatable()

  1. unsigned int SdioSetAdmatable (unsigned char * admatable, unsigned int admaIndex, const unsigned int * dataAddr, unsigned int dataLen )

Description:

Sets an SDIO ADMA.

This function places a specified length of data into the ADMA with a specified ADMA ID admaIndex.

Parameters:

Name

Description

admatable Indicates the pointer to the start address of the ADMA table. Each ADMA table occupies 8 bytes.
admaIndex Indicates the ADMA ID, ranging from 0 to 130.
dataAddr Indicates the pointer to the address where data is to send.
dataLen Indicates the length of the data to send.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioSetPadAdmatab()

  1. unsigned int SdioSetPadAdmatab (unsigned int padlen, unsigned char * admatable, unsigned int admaIndex )

Description:

Sets the ADMA table that requires data padding.

Parameters:

Name

Description

padlen Indicates the length of the data to pad.
admatable Indicates the pointer to the start address of the ADMA table. Each ADMA table occupies 8 bytes.
admaIndex Indicates the ADMA ID, ranging from 0 to 130.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SdioSetPowerdownWhenDeepSleep()

  1. void SdioSetPowerdownWhenDeepSleep (unsigned char powerDown)

Description:

Sets whether the SDIO device is powered off in deep sleep mode.

Parameters:

Name

Description

powerDown Specifies whether to power off the SDIO device. The value 1 means to power it off, and 0 means not to power it off.

SdioSoftReset()

  1. void SdioSoftReset (void )

Description:

Resets the SDIO device.

SdioWriteExtinfo()

  1. unsigned int SdioWriteExtinfo ([WifiIotSdioExtendFunc]($api-api-LinkIoT-WifiIotSdioExtendFunc.md) * extFunc)

Description:

Sets the extended SDIO attributes.

Parameters:

Name

Description

extFunc Indicates the pointer to the extended attributes.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiDeinit()

  1. unsigned int SpiDeinit ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId)

Description:

Deinitializes an SPI device.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiHostRead()

  1. unsigned int SpiHostRead ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * readData, unsigned int byteLen )

Description:

Reads data in half-duplex SPI master mode.

In SPI master mode, this function reads data of the length specified by byteLen in readData through the channel specified by spiId.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
readData Indicates the pointer to the data to read.
byteLen Indicates the length of the data to read.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiHostWrite()

  1. unsigned int SpiHostWrite ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * writeData, unsigned int byteLen )

Description:

Sends data in half-duplex SPI master mode.

In SPI master mode, this function sends data of the length specified by byteLen in writeData through the channel specified by spiId.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
writeData Indicates the pointer to the data to send.
byteLen Indicates the length of the data to send.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiHostWriteread()

  1. unsigned int SpiHostWriteread ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * writeData, char * readData, unsigned int byteLen )

Description:

Sends and reads data in full-duplex SPI master mode.

In SPI master mode, this function sends data in writeData and reads data of the length specified by byteLen in readData both through the channel specified by spiId.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
writeData Indicates the pointer to the data to send.
readData Indicates the pointer to the data to read.
byteLen Indicates the length of the data to read.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiInit()

  1. unsigned int SpiInit ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, [WifiIotSpiCfgInitParam]($api-api-LinkIoT-WifiIotSpiCfgInitParam.md) initParam, const [WifiIotSpiCfgBasicInfo]($api-api-LinkIoT-WifiIotSpiCfgBasicInfo.md) * param )

Description:

Initializes an SPI device.

This function initializes the device with the channel ID spiId, device type initParam, and device parameter param.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
initParam Specifies whether the device is a slave one.
param Indicates the pointer to the SPI device parameter.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiRegisterUsrFunc()

  1. unsigned int SpiRegisterUsrFunc ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, [SpiIsrFunc]($api-api-LinkIoT-Wifiiot.md#gad1acc3e9c9d1c63f70aeb9d5201ed1f0) prepareF, [SpiIsrFunc]($api-api-LinkIoT-Wifiiot.md#gad1acc3e9c9d1c63f70aeb9d5201ed1f0) restoreF )

Description:

Registers the data TX preparation/recovery function.

This function registers the functions registered by prepareF and restoreF for an SPI device with a channel specified by spiId.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
prepareF Indicates the function used for data preparation.
restoreF Indicates the function used for data recovery.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiSetBasicInfo()

  1. unsigned int SpiSetBasicInfo ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, const [WifiIotSpiCfgBasicInfo]($api-api-LinkIoT-WifiIotSpiCfgBasicInfo.md) * param )

Description:

Sets the SPI channel parameter.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
param Indicates the pointer to the SPI parameter to set.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiSetDmaMode()

  1. unsigned int SpiSetDmaMode ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, unsigned char dmaEn )

Description:

Sets whether to enable DMA to transfer data for an SPI device in slave mode.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
dmaEn Specifies whether to enable DMA. The value 1 means to enable DMA, and 0 means to disable DMA.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiSetIrqMode()

  1. unsigned int SpiSetIrqMode ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, unsigned char irqEn )

Description:

Sets whether to enable the interrupt request (IRQ) mode for an SPI device.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
irqEn Specifies whether to enable IRQ. The value 1 means to enable IRQ, and 0 means to disable IRQ.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiSetLoopBackMode()

  1. unsigned int SpiSetLoopBackMode ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, unsigned char lbEn )

Description:

Sets whether to enable loopback test for an SPI device.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
lbEn Specifies whether to enable loopback test. The value 1 means to enable loopback test, and 0 means to disable loopback test.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiSlaveRead()

  1. unsigned int SpiSlaveRead ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * readData, unsigned int byteLen, unsigned int timeOutMs )

Description:

Reads data in SPI slave mode.

In SPI slave mode, this function reads data of the length specified by byteLen in readData through the channel specified by spiId within the duration timeOutMs.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
readData Indicates the pointer to the data to read.
byteLen Indicates the length of the data to read.
timeOutMs Indicates the timeout interval.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

SpiSlaveWrite()

  1. unsigned int SpiSlaveWrite ([WifiIotSpiIdx]($api-api-LinkIoT-Wifiiot.md#ga1d095e78d92cdf2ffc5e34443726e44b) spiId, char * writeData, unsigned int byteLen, unsigned int timeOutMs )

Description:

Sends data in SPI slave mode.

In SPI slave mode, this function sends data of the length specified by byteLen in writeData through the channel specified by spiId within the duration timeOutMs.

Parameters:

Name

Description

spiId Indicates the SPI channel ID.
writeData Indicates the pointer to the data to send.
byteLen Indicates the length of the data to send.
timeOutMs Indicates the timeout interval.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartDeinit()

  1. unsigned int UartDeinit ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id)

Description:

Deinitializes a UART device.

Parameters:

Name

Description

id Indicates the UART port number.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartGetAttribute()

  1. unsigned int UartGetAttribute ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, [WifiIotUartAttribute]($api-api-LinkIoT-WifiIotUartAttribute.md) * attr, [WifiIotUartExtraAttr]($api-api-LinkIoT-WifiIotUartExtraAttr.md) * extraAttr )

Description:

Obtains UART attributes.

This function obtains the basic and extended attributes of a UART device.

Parameters:

Name

Description

id Indicates the UART port number.
attr Indicates the pointer to the basic UART attributes.
extraAttr Indicates the pointer to the extended UART attributes.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartInit()

  1. unsigned int UartInit ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, const [WifiIotUartAttribute]($api-api-LinkIoT-WifiIotUartAttribute.md) * param, const [WifiIotUartExtraAttr]($api-api-LinkIoT-WifiIotUartExtraAttr.md) * extraAttr )

Description:

Configures a UART device.

This function configures a UART device with the port number specified by id based on the basic and extended attributes.

Parameters:

Name

Description

id Indicates the UART port number.
param Indicates the pointer to the basic UART attributes.
extraAttr Indicates the pointer to the extended UART attributes.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartIsBufEmpty()

  1. unsigned int UartIsBufEmpty ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, unsigned char * empty )

Description:

Checks whether the buffer on a UART device is empty.

The query result will be stored in empty.

Parameters:

Name

Description

id Indicates the UART port number.
empty Indicates the pointer to the address whether the query result is to be stored. If the buffer is empty, the query result is 1. If the buffer is not empty, the query result is 0.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartIsBusy()

  1. unsigned int UartIsBusy ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, unsigned char * busy )

Description:

Checks whether the buffer on a UART device is busy.

The query result will be stored in busy.

Parameters:

Name

Description

id Indicates the UART port number.
busy Indicates the pointer to the address whether the query result is to be stored. If the buffer is busy, the query result is 1. If the buffer is not busy, the query result is 0.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartRead()

  1. int UartRead ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, unsigned char * data, unsigned int dataLen )

Description:

Reads data from a UART device.

This function reads a specified length of data from a UART device with the port number specified by id.

Parameters:

Name

Description

id Indicates the UART port number.
data Indicates the pointer to the start address of the data to read.
dataLen Indicates the number of bytes to read.

Returns:

Returns the number of bytes read if the operation is successful; returns -1 otherwise.

UartSetFlowCtrl()

  1. unsigned int UartSetFlowCtrl ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, [WifiIotFlowCtrl]($api-api-LinkIoT-Wifiiot.md#gacf7ec5d973706e8239c7c6e4a470d8ab) flowCtrl )

Description:

Sets UART hardware flow control.

This function configures flow control for a UART device with the port number specified by id.

Parameters:

Name

Description

id Indicates the UART port number.
flowCtrl Indicates the parameter used for hardware flow control.

Returns:

Returns WIFI_IOT_SUCCESS if the operation is successful; returns an error code defined in wifiiot_errno.h otherwise.

UartWrite()

  1. int UartWrite ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, const unsigned char * data, unsigned int dataLen )

Description:

Writes data to a UART device.

This function writes a specified length of data to a UART device with the port number specified by id.

Parameters:

Name

Description

id Indicates the UART port number.
data Indicates the pointer to the start address of the data to write.
dataLen Indicates the number of bytes to write.

Returns:

Returns the number of bytes written if the operation is successful; returns -1 otherwise.

UartWriteImmediately()

  1. int UartWriteImmediately ([WifiIotUartIdx]($api-api-LinkIoT-Wifiiot.md#ga2699252424e5469ef243ae279a263c44) id, const unsigned char * data, unsigned int dataLen )

Description:

Writes data to be sent to a UART device in polling mode.

Parameters:

Name

Description

id Indicates the UART port number.
data Indicates the pointer to the start address of the data to write.
dataLen Indicates the number of bytes to write.

Returns:

Returns the number of bytes written if the operation is successful; returns -1 otherwise.

WatchDogDisable()

  1. void WatchDogDisable (void )

Description:

Disables the watchdog.

WatchDogEnable()

  1. void WatchDogEnable (void )

Description:

Enables the watchdog.

WatchDogKick()

  1. void WatchDogKick (void )

Description:

Feeds the watchdog.