Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more
nmdrv.h
00001 /** 00002 * 00003 * \file 00004 * 00005 * \brief This module contains NMC1500 M2M driver APIs declarations. 00006 * 00007 * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 00008 * 00009 * \asf_license_start 00010 * 00011 * \page License 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions are met: 00015 * 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 00019 * 2. Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * 00023 * 3. The name of Atmel may not be used to endorse or promote products derived 00024 * from this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00027 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00028 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00029 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00030 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00031 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00032 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00033 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00034 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00035 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 * POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * \asf_license_stop 00039 * 00040 */ 00041 00042 #ifndef _NMDRV_H_ 00043 #define _NMDRV_H_ 00044 00045 #include "common/include/nm_common.h" 00046 00047 /** 00048 * @struct tstrM2mRev 00049 * @brief Structure holding firmware version parameters and build date/time 00050 */ 00051 typedef struct { 00052 uint32 u32Chipid; /* HW revision which will be basically the chip ID */ 00053 uint8 u8FirmwareMajor; /* Version Major Number which represents the official release base */ 00054 uint8 u8FirmwareMinor; /* Version Minor Number which represents the engineering release base */ 00055 uint8 u8FirmwarePatch; /* Version pathc Number which represents the pathces release base */ 00056 uint8 u8DriverMajor; /* Version Major Number which represents the official release base */ 00057 uint8 u8DriverMinor; /* Version Minor Number which represents the engineering release base */ 00058 uint8 u8DriverPatch; /* Version Patch Number which represents the pathces release base */ 00059 uint8 BuildDate[sizeof(__DATE__)]; 00060 uint8 BuildTime[sizeof(__TIME__)]; 00061 uint8 _PAD8_; 00062 uint16 u16FirmwareSvnNum; 00063 uint16 _PAD16_[2]; 00064 } tstrM2mRev; 00065 00066 /** 00067 * @struct tstrM2mBinaryHeader 00068 * @brief Structure holding compatibility version info for firmware binaries 00069 */ 00070 typedef struct { 00071 tstrM2mRev binVerInfo; 00072 uint32 flashOffset; 00073 uint32 payloadSize; 00074 } tstrM2mBinaryHeader; 00075 00076 #ifdef __cplusplus 00077 extern "C" { 00078 #endif 00079 /** 00080 * @fn nm_get_firmware_info(tstrM2mRev* M2mRev) 00081 * @brief Get Firmware version info 00082 * @param [out] M2mRev 00083 * pointer holds address of structure "tstrM2mRev" that contains the firmware version parameters 00084 * @version 1.0 00085 */ 00086 sint8 nm_get_firmware_info(tstrM2mRev* M2mRev); 00087 /** 00088 * @fn nm_get_firmware_full_info(tstrM2mRev* pstrRev) 00089 * @brief Get Firmware version info 00090 * @param [out] M2mRev 00091 * pointer holds address of structure "tstrM2mRev" that contains the firmware version parameters 00092 * @version 1.0 00093 */ 00094 sint8 nm_get_firmware_full_info(tstrM2mRev* pstrRev); 00095 /** 00096 * @fn nm_get_ota_firmware_info(tstrM2mRev* pstrRev) 00097 * @brief Get Firmware version info 00098 * @param [out] M2mRev 00099 * pointer holds address of structure "tstrM2mRev" that contains the firmware version parameters 00100 00101 * @version 1.0 00102 */ 00103 sint8 nm_get_ota_firmware_info(tstrM2mRev* pstrRev); 00104 /* 00105 * @fn nm_drv_init 00106 * @brief Initialize NMC1000 driver 00107 * @return ZERO in case of success and Negative error code in case of failure 00108 */ 00109 sint8 nm_drv_init_download_mode (void); 00110 00111 /* 00112 * @fn nm_drv_init 00113 * @brief Initialize NMC1000 driver 00114 * @return M2M_SUCCESS in case of success and Negative error code in case of failure 00115 * @param [in] arg 00116 * Generic argument TBD 00117 * @return ZERO in case of success and Negative error code in case of failure 00118 00119 */ 00120 sint8 nm_drv_init (void * arg); 00121 00122 /** 00123 * @fn nm_drv_deinit 00124 * @brief Deinitialize NMC1000 driver 00125 * @author M. Abdelmawla 00126 * @param [in] arg 00127 * Generic argument TBD 00128 * @return ZERO in case of success and Negative error code in case of failure 00129 */ 00130 sint8 nm_drv_deinit(void * arg); 00131 00132 #ifdef __cplusplus 00133 } 00134 #endif 00135 00136 #endif /*_NMDRV_H_*/ 00137 00138 00139
Generated on Wed Jul 13 2022 16:32:37 by
1.7.2