This module contains WILC common APIs declarations.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include "bsp/include/nm_bsp.h"
Macros | |
#define | BOOT_START 0x12345678UL |
#define | BOOT_SUCCESS 0x10add09eUL |
#define | BYTE_0(word) ((uint8)(((word) >> 0 ) & 0x000000FFUL)) |
#define | BYTE_1(word) ((uint8)(((word) >> 8 ) & 0x000000FFUL)) |
#define | BYTE_2(word) ((uint8)(((word) >> 16) & 0x000000FFUL)) |
#define | BYTE_3(word) ((uint8)(((word) >> 24) & 0x000000FFUL)) |
#define | DATA_PKT_OFFSET 4 |
#define | ERR_FIRMEWARE_EXCEED_SIZE 0xE5UL /*Total size of firmware exxed the max size 256k*/ |
#define | ERR_PREFIX_NMIS 0xE4UL /*wrong first four byte in flash NMIS*/ |
#define | I2C_ERR_LARGE_ADDRESS 0xE1UL /*the address exceed the max addressing mode in i2c flash*/ |
#define | I2C_ERR_OVER_SIZE 0xE3UL |
#define | I2C_ERR_TX_ABRT 0xE2UL /*NO ack from slave*/ |
#define | M2M_ACK ((sint8)-11) |
#define | M2M_DBG(...) |
#define | M2M_DBG(...) |
#define | M2M_ERR(...) |
#define | M2M_ERR(...) |
#define | M2M_ERR_BUS_FAIL ((sint8)-6) |
#define | M2M_ERR_FAIL ((sint8)-12) |
#define | M2M_ERR_FIRMWARE ((sint8)-8) |
#define | M2M_ERR_FIRMWARE_bURN ((sint8)-10) |
#define | M2M_ERR_FW_VER_MISMATCH ((sint8)-13) |
#define | M2M_ERR_INIT ((sint8)-5) |
#define | M2M_ERR_MEM_ALLOC ((sint8)-3) |
#define | M2M_ERR_RCV ((sint8)-2) |
#define | M2M_ERR_SCAN_IN_PROGRESS ((sint8)-14) |
#define | M2M_ERR_SEND ((sint8)-1) |
#define | M2M_ERR_TIME_OUT ((sint8)-4) |
#define | M2M_INFO(...) |
#define | M2M_INFO(...) |
#define | M2M_LOG_DBG 4 |
#define | M2M_LOG_ERROR 1 |
#define | M2M_LOG_INFO 2 |
#define | M2M_LOG_LEVEL M2M_LOG_DBG |
#define | M2M_LOG_NONE 0 |
#define | M2M_LOG_REQ 3 |
#define | M2M_MAX(A, B) ((A) > (B) ? (A) : (B)) |
#define | M2M_NOT_YET ((sint8)-7) |
#define | M2M_PRINT(...) |
#define | M2M_REQ(...) |
#define | M2M_SEL(x, m1, m2, m3) ((x>1)?((x>2)?(m3):(m2)):(m1)) |
#define | M2M_SPI_FAIL ((sint8)-9) |
#define | M2M_SUCCESS ((sint8)0) |
#define | M2M_TIME_OUT_DELAY 10000 |
#define | NBIT0 (0x00000001) |
#define | NBIT1 (0x00000002) |
#define | NBIT10 (0x00000400) |
#define | NBIT11 (0x00000800) |
#define | NBIT12 (0x00001000) |
#define | NBIT13 (0x00002000) |
#define | NBIT14 (0x00004000) |
#define | NBIT15 (0x00008000) |
#define | NBIT16 (0x00010000) |
#define | NBIT17 (0x00020000) |
#define | NBIT18 (0x00040000) |
#define | NBIT19 (0x00080000) |
#define | NBIT2 (0x00000004) |
#define | NBIT20 (0x00100000) |
#define | NBIT21 (0x00200000) |
#define | NBIT22 (0x00400000) |
#define | NBIT23 (0x00800000) |
#define | NBIT24 (0x01000000) |
#define | NBIT25 (0x02000000) |
#define | NBIT26 (0x04000000) |
#define | NBIT27 (0x08000000) |
#define | NBIT28 (0x10000000) |
#define | NBIT29 (0x20000000) |
#define | NBIT3 (0x00000008) |
#define | NBIT30 (0x40000000) |
#define | NBIT31 (0x80000000) |
#define | NBIT4 (0x00000010) |
#define | NBIT5 (0x00000020) |
#define | NBIT6 (0x00000040) |
#define | NBIT7 (0x00000080) |
#define | NBIT8 (0x00000100) |
#define | NBIT9 (0x00000200) |
#define | PROGRAM_START 0x26961735UL |
#define | WORD_ALIGN(val) (((val) & 0x03) ? ((val) + 4 - ((val) & 0x03)) : (val)) |
Enumerations | |
enum | tenuM2mReqGrp { M2M_REQ_GRP_MAIN = 0, M2M_REQ_GRP_WIFI, M2M_REQ_GRP_HIF } |
enum | tenuM2mReqPkt { M2M_REQ_CONFIG_PKT, M2M_REQ_DATA_PKT = NBIT7 } |
Functions | |
NMI_API uint8 | m2m_checksum (uint8 *buf, int sz) |
NMI_API sint8 | m2m_memcmp (uint8 *pu8Buff1, uint8 *pu8Buff2, uint32 u32Size) |
NMI_API void | m2m_memcpy (uint8 *pDst, uint8 *pSrc, uint32 sz) |
NMI_API void | m2m_memset (uint8 *pBuf, uint8 val, uint32 sz) |
NMI_API uint16 | m2m_strlen (uint8 *pcStr) |
NMI_API uint8 | m2m_strncmp (uint8 *pcS1, uint8 *pcS2, uint16 u16Len) |
NMI_API uint8 * | m2m_strstr (uint8 *pcIn, uint8 *pcStr) |
#define BOOT_START 0x12345678UL |
#define BOOT_SUCCESS 0x10add09eUL |
#define BYTE_0 | ( | word | ) | ((uint8)(((word) >> 0 ) & 0x000000FFUL)) |
#define BYTE_1 | ( | word | ) | ((uint8)(((word) >> 8 ) & 0x000000FFUL)) |
#define BYTE_2 | ( | word | ) | ((uint8)(((word) >> 16) & 0x000000FFUL)) |
#define BYTE_3 | ( | word | ) | ((uint8)(((word) >> 24) & 0x000000FFUL)) |
#define DATA_PKT_OFFSET 4 |
#define ERR_FIRMEWARE_EXCEED_SIZE 0xE5UL /*Total size of firmware exxed the max size 256k*/ |
#define ERR_PREFIX_NMIS 0xE4UL /*wrong first four byte in flash NMIS*/ |
#define I2C_ERR_LARGE_ADDRESS 0xE1UL /*the address exceed the max addressing mode in i2c flash*/ |
#define I2C_ERR_OVER_SIZE 0xE3UL |
#define I2C_ERR_TX_ABRT 0xE2UL /*NO ack from slave*/ |
#define M2M_ACK ((sint8)-11) |
#define M2M_DBG | ( | ... | ) |
Referenced by atCmd_MonEn_Handler(), atCmd_PsMode_Handler(), chip_deinit(), firmware_download(), get_index_cmdHandler(), hif_deinit(), hif_send(), hif_send_optimized(), m2m_wifi_cb(), m2m_wifi_enable_mac_mcast(), m2m_wifi_set_max_tx_rate(), nmi_get_otp_mac_address(), StrMac2Bin(), and wait_for_firmware_start().
#define M2M_DBG | ( | ... | ) |
#define M2M_ERR | ( | ... | ) |
Referenced by atCmd_Ping(), chip_deinit(), chip_sleep(), chip_wake(), cmd_handler(), cpu_start(), hif_handle_isr(), hif_isr(), hif_receive(), hif_register_cb(), hif_send(), hif_send_optimized(), hif_set_receive_buffer(), m2m_wifi_cb(), m2m_wifi_connect(), m2m_wifi_download_cert(), m2m_wifi_p2p(), m2m_wifi_request_scan(), m2m_wifi_request_scan_ssid(), m2m_wifi_send_ethernet_pkt(), m2m_wifi_set_antenna_mode(), m2m_wifi_set_cust_InfoElement(), m2m_wifi_set_receive_buffer(), m2m_wifi_set_scan_list(), m2m_wifi_set_scan_options(), nm_bus_ioctl(), nm_drv_deinit(), nm_drv_init(), print_Handle_status(), pullup_ctrl(), spi_flash_get_size(), and start_m2m_app().
#define M2M_ERR | ( | ... | ) |
#define M2M_ERR_BUS_FAIL ((sint8)-6) |
Referenced by cpu_start(), enable_interrupts(), hif_isr(), and nm_bus_init().
#define M2M_ERR_FAIL ((sint8)-12) |
Referenced by atCmd_Connect_Handler(), atCmd_IsParameterNumericOnly(), atCmd_MonEn_Handler(), atCmd_Ping(), func_uint_imp(), func_void_imp(), hif_receive(), hif_register_cb(), m2m_wifi_connect(), m2m_wifi_enable_mac_mcast(), m2m_wifi_p2p(), m2m_wifi_set_antenna_mode(), m2m_wifi_set_cust_InfoElement(), m2m_wifi_set_ht_enable(), m2m_wifi_set_max_tx_rate(), m2m_wifi_set_receive_buffer(), m2m_wifi_set_scan_list(), m2m_wifi_set_scan_options(), m2m_wifi_set_scan_region(), and StrMac2Bin().
#define M2M_ERR_FIRMWARE ((sint8)-8) |
#define M2M_ERR_FIRMWARE_bURN ((sint8)-10) |
#define M2M_ERR_FW_VER_MISMATCH ((sint8)-13) |
Referenced by nm_drv_init(), and nm_get_firmware_info().
#define M2M_ERR_INIT ((sint8)-5) |
Referenced by wait_for_firmware_start().
#define M2M_ERR_MEM_ALLOC ((sint8)-3) |
Referenced by hif_send(), and hif_send_optimized().
#define M2M_ERR_SCAN_IN_PROGRESS ((sint8)-14) |
Referenced by m2m_wifi_request_scan(), and m2m_wifi_request_scan_ssid().
#define M2M_ERR_SEND ((sint8)-1) |
Referenced by hif_send(), and hif_send_optimized().
#define M2M_ERR_TIME_OUT ((sint8)-4) |
Referenced by chip_wake(), os_m2m_wifi_ap_get_assoc_info(), os_m2m_wifi_connect(), os_m2m_wifi_disable_ap(), os_m2m_wifi_disable_mcast_filter(), os_m2m_wifi_disable_monitoring_mode(), os_m2m_wifi_disconnect(), os_m2m_wifi_enable_ap(), os_m2m_wifi_enable_mcast_filter(), os_m2m_wifi_get_connection_info(), os_m2m_wifi_get_num_ap_found(), os_m2m_wifi_get_sleep_mode(), os_m2m_wifi_init(), os_m2m_wifi_p2p(), os_m2m_wifi_p2p_disconnect(), os_m2m_wifi_req_curr_rssi(), os_m2m_wifi_req_scan_result(), os_m2m_wifi_request_scan(), os_m2m_wifi_set_max_tx_rate(), os_m2m_wifi_set_p2p_control_ifc(), os_m2m_wifi_set_scan_region(), and os_m2m_wifi_wps_disable().
#define M2M_INFO | ( | ... | ) |
#define M2M_INFO | ( | ... | ) |
#define M2M_LOG_DBG 4 |
#define M2M_LOG_ERROR 1 |
#define M2M_LOG_INFO 2 |
#define M2M_LOG_LEVEL M2M_LOG_DBG |
#define M2M_LOG_NONE 0 |
#define M2M_LOG_REQ 3 |
#define M2M_MAX | ( | A, | |
B | |||
) | ((A) > (B) ? (A) : (B)) |
#define M2M_NOT_YET ((sint8)-7) |
#define M2M_PRINT | ( | ... | ) |
Referenced by atCmd_PsMode_Handler(), SetServerIpAddr(), and spi_flash_rdid().
#define M2M_REQ | ( | ... | ) |
#define M2M_SEL | ( | x, | |
m1, | |||
m2, | |||
m3 | |||
) | ((x>1)?((x>2)?(m3):(m2)):(m1)) |
#define M2M_SPI_FAIL ((sint8)-9) |
#define M2M_SUCCESS ((sint8)0) |
Referenced by atCmd_AntDiversity_Handler(), atCmd_ApDisable_Handler(), atCmd_ApEnable_Handler(), atCmd_CurRSSI_Handler(), atCmd_DisConnect_Handler(), atCmd_HTTPCon_Handler(), atCmd_IPCon_Handler(), atCmd_IsParameterNumericOnly(), atCmd_MonDis_Handler(), atCmd_MonEn_Handler(), atCmd_P2pDisable_Handler(), atCmd_P2pEnable_Handler(), atCmd_SetStaticIP_Handler(), atCmd_WpsConnect_Handler(), atCmd_WpsDisable_Handler(), chip_apply_conf(), chip_deinit(), chip_reset(), chip_sleep(), chip_wake(), cmd_handler(), cpu_start(), enable_interrupts(), firmware_download(), get_gpio_val(), gpio_ioctl(), hif_chip_sleep(), hif_chip_sleep_sc(), hif_chip_wake(), hif_deinit(), hif_handle_isr(), hif_init(), hif_isr(), hif_receive(), hif_register_cb(), hif_send(), hif_send_optimized(), hif_set_rx_done(), init_m2m_app(), iperf_tcp_task(), iperf_udp_send(), m2m_periph_gpio_pullup_ctrl(), m2m_periph_i2c_master_init(), m2m_periph_i2c_master_read(), m2m_periph_i2c_master_write(), m2m_periph_init(), m2m_wifi_ap_add_black_list(), m2m_wifi_ap_get_assoc_info(), m2m_wifi_connect(), m2m_wifi_deinit(), m2m_wifi_disable_ap(), m2m_wifi_enable_ap(), m2m_wifi_get_mac_address(), m2m_wifi_get_otp_mac_address(), m2m_wifi_init(), m2m_wifi_p2p(), m2m_wifi_p2p_disconnect(), m2m_wifi_req_curr_rssi(), m2m_wifi_req_scan_result(), m2m_wifi_request_scan(), m2m_wifi_request_scan_ssid(), m2m_wifi_set_receive_buffer(), m2m_wifi_set_scan_list(), m2m_wifi_set_scan_options(), m2m_wifi_set_sleep_mode(), m2m_wifi_set_tx_power(), m2m_wifi_wps_disable(), nm_bus_deinit(), nm_bus_iface_deinit(), nm_bus_iface_init(), nm_bus_iface_reconfigure(), nm_bus_init(), nm_bus_reset(), nm_drv_deinit(), nm_drv_init(), nm_get_firmware_info(), nm_read_block(), nm_write_block(), nmi_get_mac_address(), nmi_get_otp_mac_address(), nmi_get_rfrevid(), os_m2m_wifi_init_imp(), pullup_ctrl(), set_gpio_dir(), set_gpio_val(), spi_flash_get_size(), spi_flash_probe(), start_m2m_app(), StrMac2Bin(), wait_for_firmware_start(), wifi_cb(), wifi_task(), and wilc_netif_tx_from_queue().
#define M2M_TIME_OUT_DELAY 10000 |
#define NBIT0 (0x00000001) |
#define NBIT1 (0x00000002) |
#define NBIT10 (0x00000400) |
#define NBIT11 (0x00000800) |
#define NBIT12 (0x00001000) |
#define NBIT13 (0x00002000) |
#define NBIT14 (0x00004000) |
#define NBIT15 (0x00008000) |
#define NBIT16 (0x00010000) |
#define NBIT17 (0x00020000) |
#define NBIT18 (0x00040000) |
#define NBIT19 (0x00080000) |
#define NBIT2 (0x00000004) |
#define NBIT20 (0x00100000) |
#define NBIT21 (0x00200000) |
#define NBIT22 (0x00400000) |
#define NBIT23 (0x00800000) |
#define NBIT24 (0x01000000) |
#define NBIT25 (0x02000000) |
#define NBIT26 (0x04000000) |
#define NBIT27 (0x08000000) |
#define NBIT28 (0x10000000) |
#define NBIT29 (0x20000000) |
#define NBIT3 (0x00000008) |
#define NBIT30 (0x40000000) |
#define NBIT31 (0x80000000) |
#define NBIT4 (0x00000010) |
#define NBIT5 (0x00000020) |
#define NBIT6 (0x00000040) |
#define NBIT7 (0x00000080) |
Referenced by hif_send(), and hif_send_optimized().
#define NBIT8 (0x00000100) |
#define NBIT9 (0x00000200) |
#define PROGRAM_START 0x26961735UL |
#define WORD_ALIGN | ( | val | ) | (((val) & 0x03) ? ((val) + 4 - ((val) & 0x03)) : (val)) |
enum tenuM2mReqGrp |
enum tenuM2mReqPkt |
Referenced by firmware_download(), hif_init(), m2m_wifi_ap_add_black_list(), m2m_wifi_connect(), m2m_wifi_download_cert(), m2m_wifi_enable_ap(), m2m_wifi_enable_mac_mcast(), m2m_wifi_enable_monitoring_mode(), m2m_wifi_get_mac_address(), m2m_wifi_get_otp_mac_address(), m2m_wifi_request_scan_ssid(), m2m_wifi_set_cust_InfoElement(), m2m_wifi_set_device_name(), m2m_wifi_set_lsn_int(), m2m_wifi_set_mac_address(), m2m_wifi_set_p2p_pin(), m2m_wifi_set_scan_list(), m2m_wifi_wps(), and pbkdf2_sha1_f().
Referenced by m2m_wifi_request_scan(), m2m_wifi_request_scan_ssid(), and nmi_get_otp_mac_address().
Referenced by m2m_strstr(), m2m_wifi_connect(), m2m_wifi_enable_ap(), m2m_wifi_request_scan_ssid(), and wifi_cb().
References m2m_strlen(), and m2m_strncmp().