Microchip® Advanced Software Framework

winc1500/host_drv/driver/source/nmdrv.h File Reference

This module contains NMC1500 M2M driver APIs declarations.

Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.

#include "common/include/nm_common.h"

Data Structures

struct  tstrM2mBinaryHeader
 Structure holding compatibility version info for firmware binaries. More...
 
struct  tstrM2mRev
 Structure holding firmware version parameters and build date/time. More...
 

Functions

sint8 nm_drv_deinit (void *arg)
 
sint8 nm_drv_init (void *arg)
 
sint8 nm_drv_init_download_mode (void)
 Initialize NMC1000 driver in download mode. More...
 
sint8 nm_drv_init_hold (void)
 First part of nm_drv_init, up to the point of initializing spi for flash access. More...
 
sint8 nm_drv_init_start (void *arg)
 
sint8 nm_get_firmware_full_info (tstrM2mRev *pstrRev)
 Get Firmware version info. More...
 
sint8 nm_get_firmware_info (tstrM2mRev *M2mRev)
 Get Firmware version info. More...
 
sint8 nm_get_ota_firmware_info (tstrM2mRev *pstrRev)
 Get Firmware version info. More...
 

sint8 nm_drv_deinit ( void *  arg)
sint8 nm_drv_init_download_mode ( void  )

Initialize NMC1000 driver in download mode.

Parameters
[in]req_serial_numberChip serial number
Returns
M2M_SUCCESS in case of success and Negative error code in case of failure

TODO:reset the chip and halt the cpu in case of no wait efuse is set (add the no wait effuse check)

References chip_reset_and_cpu_halt(), GET_CHIPID, ISNMC3000, M2M_ERR, M2M_INFO, M2M_SUCCESS, nm_bus_iface_init(), nm_spi_init(), nm_write_reg(), nmi_get_chipid(), and NULL.

Referenced by m2m_wifi_download_mode().

sint8 nm_drv_init_hold ( void  )

First part of nm_drv_init, up to the point of initializing spi for flash access.

See Also
nm_drv_init
Parameters
[in]req_serial_numberParameter inherited from nm_drv_init
Returns
M2M_SUCCESS in case of success and Negative error code in case of failure

References chip_reset(), chip_wake(), M2M_ERR, M2M_INFO, M2M_SUCCESS, nm_bus_iface_deinit(), nm_bus_iface_init(), nm_spi_init(), nmi_get_chipid(), and NULL.

Referenced by m2m_wifi_init_hold(), and nm_drv_init().

sint8 nm_drv_init_start ( void *  arg)
sint8 nm_get_firmware_full_info ( tstrM2mRev pstrRev)

Get Firmware version info.

Parameters
[out]M2mRevpointer holds address of structure "tstrM2mRev" that contains the firmware version parameters
Version
1.0
Parameters
[out]M2mRevPointer holds address of structure tstrM2mRev that contains the firmware version parameters
[out]pstrRevPointer holds address of structure tstrM2mRev that contains the version parameters of image in the active partition.
Returns
M2M_SUCCESS in case of success and Negative error code in case of failure
sint8 nm_get_ota_firmware_info ( tstrM2mRev pstrRev)

Get Firmware version info.

Parameters
[out]M2mRevpointer holds address of structure "tstrM2mRev" that contains the firmware version parameters
Version
1.0
Parameters
[out]M2mRevPointer holds address of structure tstrM2mRev that contains the firmware version parameters
[out]pstrRevPointer holds address of structure tstrM2mRev that contains the version parameters of image in the inactive partition.
Returns
M2M_SUCCESS in case of success and Negative error code in case of failure