/hal_atmel-2.7.6/asf/common/components/wifi/winc1500/spi_flash/source/ |
D | spi_flash.c | 97 sint8 ret = M2M_SUCCESS; in spi_flash_read_status_reg() local 103 ret += nm_write_reg(SPI_FLASH_DATA_CNT, 4); in spi_flash_read_status_reg() 104 ret += nm_write_reg(SPI_FLASH_BUF1, cmd[0]); in spi_flash_read_status_reg() 105 ret += nm_write_reg(SPI_FLASH_BUF_DIR, 0x01); in spi_flash_read_status_reg() 106 ret += nm_write_reg(SPI_FLASH_DMA_ADDR, DUMMY_REGISTER); in spi_flash_read_status_reg() 107 ret += nm_write_reg(SPI_FLASH_CMD_CNT, 1 | (1<<7)); in spi_flash_read_status_reg() 110 ret += nm_read_reg_with_ret(SPI_FLASH_TR_DONE, (uint32 *)®); in spi_flash_read_status_reg() 111 if(M2M_SUCCESS != ret) break; in spi_flash_read_status_reg() 115 reg = (M2M_SUCCESS == ret)?(nm_read_reg(DUMMY_REGISTER)):(0); in spi_flash_read_status_reg() 117 return ret; in spi_flash_read_status_reg() [all …]
|
/hal_atmel-2.7.6/asf/common/components/wifi/winc1500/driver/source/ |
D | nmasic.c | 67 sint8 ret = M2M_SUCCESS; in chip_apply_conf() local 93 ret = nm_read_reg_with_ret(rNMI_GP_REG_1, ®); in chip_apply_conf() 94 if(ret == M2M_SUCCESS) { in chip_apply_conf() 119 sint8 ret = M2M_SUCCESS; in enable_interrupts() local 123 ret = nm_read_reg_with_ret(NMI_PIN_MUX_0, ®); in enable_interrupts() 124 if (M2M_SUCCESS != ret) goto ERR1; in enable_interrupts() 127 ret = nm_write_reg(NMI_PIN_MUX_0, reg); in enable_interrupts() 128 if (M2M_SUCCESS != ret) goto ERR1; in enable_interrupts() 133 ret = nm_read_reg_with_ret(NMI_INTR_ENABLE, ®); in enable_interrupts() 134 if (M2M_SUCCESS != ret) goto ERR1; in enable_interrupts() [all …]
|
D | nmdrv.c | 65 sint8 ret = M2M_SUCCESS; in nm_get_firmware_info() local 67 ret = nm_read_reg_with_ret(NMI_REV_REG, ®); in nm_get_firmware_info() 72 ret = nm_read_reg_with_ret(NMI_REV_REG_ATE, ®); in nm_get_firmware_info() 89 ret = M2M_ERR_FW_VER_MISMATCH; in nm_get_firmware_info() 93 ret = M2M_ERR_FW_VER_MISMATCH; in nm_get_firmware_info() 95 return ret; in nm_get_firmware_info() 108 sint8 ret = M2M_SUCCESS; in nm_get_firmware_full_info() local 113 ret = nm_read_reg_with_ret(rNMI_GP_REG_2, ®); in nm_get_firmware_full_info() 114 if(ret == M2M_SUCCESS) in nm_get_firmware_full_info() 118 ret = nm_read_block(reg|0x30000,(uint8*)&strgp,sizeof(tstrGpRegs)); in nm_get_firmware_full_info() [all …]
|
D | m2m_hif.c | 97 sint8 ret = M2M_SUCCESS; in hif_set_rx_done() local 103 ret = nm_read_reg_with_ret(WIFI_HOST_RCV_CTRL_0,®); in hif_set_rx_done() 104 if(ret != M2M_SUCCESS)goto ERR1; in hif_set_rx_done() 107 ret = nm_write_reg(WIFI_HOST_RCV_CTRL_0,reg); in hif_set_rx_done() 108 if(ret != M2M_SUCCESS)goto ERR1; in hif_set_rx_done() 113 return ret; in hif_set_rx_done() 144 sint8 ret = M2M_SUCCESS; in hif_chip_wake() local 148 return ret; in hif_chip_wake() 154 ret = chip_wake(); in hif_chip_wake() 155 if(ret != M2M_SUCCESS)goto ERR1; in hif_chip_wake() [all …]
|
D | m2m_ota.c | 82 sint8 ret = M2M_SUCCESS; in m2m_ota_cb() local 87 ret = hif_receive(u32Addr,(uint8*)&strOtaUpdateInfo,sizeof(tstrOtaUpdateInfo),0); in m2m_ota_cb() 88 if(ret == M2M_SUCCESS) in m2m_ota_cb() 98 ret = hif_receive(u32Addr, (uint8*) &strOtaUpdateStatusResp,sizeof(tstrOtaUpdateStatusResp), 0); in m2m_ota_cb() 99 if(ret == M2M_SUCCESS) in m2m_ota_cb() 129 sint8 ret = M2M_SUCCESS; in m2m_ota_init() local 144 return ret; in m2m_ota_init() 161 sint8 ret = M2M_SUCCESS; in m2m_ota_notif_set_url() local 166 ret = hif_send(M2M_REQ_GROUP_OTA,M2M_OTA_REQ_NOTIF_SET_URL,u8Url,u16UrlSize,NULL,0,0); in m2m_ota_notif_set_url() 167 return ret; in m2m_ota_notif_set_url() [all …]
|
D | m2m_wifi.c | 304 sint8 ret = M2M_SUCCESS; in m2m_wifi_download_mode() local 306 ret = nm_drv_init_download_mode(); in m2m_wifi_download_mode() 307 if(ret != M2M_SUCCESS) goto _EXIT0; in m2m_wifi_download_mode() 314 return ret; in m2m_wifi_download_mode() 454 sint8 ret = M2M_SUCCESS; in m2m_wifi_init() local 458 ret = M2M_ERR_FAIL; in m2m_wifi_init() 476 ret = nm_drv_init(&u8WifiMode); in m2m_wifi_init() 477 if(ret != M2M_SUCCESS) goto _EXIT0; in m2m_wifi_init() 479 ret = hif_init(NULL); in m2m_wifi_init() 480 if(ret != M2M_SUCCESS) goto _EXIT1; in m2m_wifi_init() [all …]
|
D | nmbus.c | 60 sint8 ret = M2M_SUCCESS; in nm_bus_iface_init() local 61 ret = nm_bus_init(pvInitVal); in nm_bus_iface_init() 62 return ret; in nm_bus_iface_init() 75 sint8 ret = M2M_SUCCESS; in nm_bus_iface_deinit() local 76 ret = nm_bus_deinit(); in nm_bus_iface_deinit() 78 return ret; in nm_bus_iface_deinit() 89 sint8 ret = M2M_SUCCESS; in nm_bus_reset() local 98 return ret; in nm_bus_reset() 111 sint8 ret = M2M_SUCCESS; in nm_bus_iface_reconfigure() local 113 ret = nm_uart_reconfigure(ptr); in nm_bus_iface_reconfigure() [all …]
|
D | m2m_periph.c | 85 sint8 ret, gpio; in gpio_ioctl() local 87 ret = hif_chip_wake(); in gpio_ioctl() 88 if(ret != M2M_SUCCESS) goto _EXIT; in gpio_ioctl() 94 ret = set_gpio_dir((uint8)gpio, u8InVal); in gpio_ioctl() 96 ret = set_gpio_val((uint8)gpio, u8InVal); in gpio_ioctl() 98 ret = get_gpio_val((uint8)gpio, pu8OutVal); in gpio_ioctl() 100 if(ret != M2M_SUCCESS) goto _EXIT1; in gpio_ioctl() 103 ret = hif_chip_sleep(); in gpio_ioctl() 105 return ret; in gpio_ioctl()
|
D | m2m_crypto.c | 732 sint8 ret = M2M_SUCCESS; in m2m_crypto_cb() local 812 sint8 ret = M2M_ERR_FAIL; in m2m_crypto_init() local 817 ret = hif_register_cb(M2M_REQ_GROUP_CRYPTO,m2m_crypto_cb); in m2m_crypto_init() 819 return ret; in m2m_crypto_init() 832 sint8 ret = M2M_ERR_FAIL; in m2m_crypto_sha256_hash_init() local 835 …ret = hif_send(M2M_REQ_GROUP_CRYPTO,M2M_CRYPTO_REQ_SHA256_INIT|M2M_REQ_DATA_PKT,(uint8*)psha256Ctx… in m2m_crypto_sha256_hash_init() 837 return ret; in m2m_crypto_sha256_hash_init() 858 sint8 ret = M2M_ERR_FAIL; in m2m_crypto_sha256_hash_update() local 861 …ret = hif_send(M2M_REQ_GROUP_CRYPTO,M2M_CRYPTO_REQ_SHA256_UPDATE|M2M_REQ_DATA_PKT,(uint8*)psha256C… in m2m_crypto_sha256_hash_update() 863 return ret; in m2m_crypto_sha256_hash_update() [all …]
|