DeepCover Embedded Security in IoT: Public-key Secured Data Paths

Dependencies:   MaximInterface

The MAXREFDES155# is an internet-of-things (IoT) embedded-security reference design, built to authenticate and control a sensing node using elliptic-curve-based public-key cryptography with control and notification from a web server.

The hardware includes an ARM® mbed™ shield and attached sensor endpoint. The shield contains a DS2476 DeepCover® ECDSA/SHA-2 coprocessor, Wifi communication, LCD push-button controls, and status LEDs. The sensor endpoint is attached to the shield using a 300mm cable and contains a DS28C36 DeepCover ECDSA/SHA-2 authenticator, IR-thermal sensor, and aiming laser for the IR sensor. The MAXREFDES155# is equipped with a standard Arduino® form-factor shield connector for immediate testing using an mbed board such as the MAX32600MBED#. The combination of these two devices represent an IoT device. Communication to the web server is accomplished with the shield Wifi circuitry. Communication from the shield to the attached sensor module is accomplished over I2C . The sensor module represents an IoT endpoint that generates small data with a requirement for message authenticity/integrity and secure on/off operational control.

The design is hierarchical with each mbed platform and shield communicating data from the sensor node to a web server that maintains a centralized log and dispatches notifications as necessary. The simplicity of this design enables rapid integration into any star-topology IoT network to provide security with the low overhead and cost provided by the ECDSA-P256 asymmetric-key and SHA-256 symmetric-key algorithms.

More information about the MAXREFDES155# is available on the Maxim Integrated website.

Committer:
IanBenzMaxim
Date:
Tue Dec 03 12:56:25 2019 -0600
Revision:
18:c2631e985780
Parent:
16:a004191a79ab
Updated MaximInterface to version 2.1.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IanBenzMaxim 0:33d4e66780c0 1 /*
IanBenzMaxim 0:33d4e66780c0 2 * trace.h - CC31xx/CC32xx Host Driver Implementation
IanBenzMaxim 0:33d4e66780c0 3 *
IanBenzMaxim 0:33d4e66780c0 4 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
IanBenzMaxim 0:33d4e66780c0 5 *
IanBenzMaxim 0:33d4e66780c0 6 *
IanBenzMaxim 0:33d4e66780c0 7 * Redistribution and use in source and binary forms, with or without
IanBenzMaxim 0:33d4e66780c0 8 * modification, are permitted provided that the following conditions
IanBenzMaxim 0:33d4e66780c0 9 * are met:
IanBenzMaxim 0:33d4e66780c0 10 *
IanBenzMaxim 0:33d4e66780c0 11 * Redistributions of source code must retain the above copyright
IanBenzMaxim 0:33d4e66780c0 12 * notice, this list of conditions and the following disclaimer.
IanBenzMaxim 0:33d4e66780c0 13 *
IanBenzMaxim 0:33d4e66780c0 14 * Redistributions in binary form must reproduce the above copyright
IanBenzMaxim 0:33d4e66780c0 15 * notice, this list of conditions and the following disclaimer in the
IanBenzMaxim 0:33d4e66780c0 16 * documentation and/or other materials provided with the
IanBenzMaxim 0:33d4e66780c0 17 * distribution.
IanBenzMaxim 0:33d4e66780c0 18 *
IanBenzMaxim 0:33d4e66780c0 19 * Neither the name of Texas Instruments Incorporated nor the names of
IanBenzMaxim 0:33d4e66780c0 20 * its contributors may be used to endorse or promote products derived
IanBenzMaxim 0:33d4e66780c0 21 * from this software without specific prior written permission.
IanBenzMaxim 0:33d4e66780c0 22 *
IanBenzMaxim 0:33d4e66780c0 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
IanBenzMaxim 0:33d4e66780c0 24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
IanBenzMaxim 0:33d4e66780c0 25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
IanBenzMaxim 0:33d4e66780c0 26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
IanBenzMaxim 0:33d4e66780c0 27 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
IanBenzMaxim 0:33d4e66780c0 28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
IanBenzMaxim 0:33d4e66780c0 29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
IanBenzMaxim 0:33d4e66780c0 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
IanBenzMaxim 0:33d4e66780c0 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
IanBenzMaxim 0:33d4e66780c0 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
IanBenzMaxim 0:33d4e66780c0 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IanBenzMaxim 0:33d4e66780c0 34 *
IanBenzMaxim 0:33d4e66780c0 35 */
IanBenzMaxim 0:33d4e66780c0 36
IanBenzMaxim 0:33d4e66780c0 37
IanBenzMaxim 0:33d4e66780c0 38
IanBenzMaxim 0:33d4e66780c0 39 #include "simplelink.h"
IanBenzMaxim 0:33d4e66780c0 40
IanBenzMaxim 0:33d4e66780c0 41 #ifndef __SIMPLELINK_TRACE_H__
IanBenzMaxim 0:33d4e66780c0 42 #define __SIMPLELINK_TRACE_H__
IanBenzMaxim 0:33d4e66780c0 43
IanBenzMaxim 0:33d4e66780c0 44
IanBenzMaxim 0:33d4e66780c0 45 #ifdef __cplusplus
IanBenzMaxim 0:33d4e66780c0 46 extern "C" {
IanBenzMaxim 0:33d4e66780c0 47 #endif
IanBenzMaxim 0:33d4e66780c0 48
IanBenzMaxim 0:33d4e66780c0 49 /*****************************************************************************/
IanBenzMaxim 0:33d4e66780c0 50 /* Macro declarations */
IanBenzMaxim 0:33d4e66780c0 51 /*****************************************************************************/
IanBenzMaxim 0:33d4e66780c0 52
IanBenzMaxim 0:33d4e66780c0 53 #define SL_SYNC_SCAN_THRESHOLD (( _u32 )2000)
IanBenzMaxim 0:33d4e66780c0 54
IanBenzMaxim 0:33d4e66780c0 55 #ifdef SL_TINY_EXT
IanBenzMaxim 0:33d4e66780c0 56 #define _SlDrvAssert(line ) { while(1); }
IanBenzMaxim 0:33d4e66780c0 57 #else
IanBenzMaxim 0:33d4e66780c0 58 #define _SlDrvAssert( ) { _SlDriverHandleError(SL_DEVICE_DRIVER_ASSERT_ERROR_EVENT, 0, 0); }
IanBenzMaxim 0:33d4e66780c0 59 #endif
IanBenzMaxim 0:33d4e66780c0 60
IanBenzMaxim 0:33d4e66780c0 61 #define _SL_ASSERT(expr) { if(!(expr)){ \
IanBenzMaxim 0:33d4e66780c0 62 _SlDrvAssert(); } \
IanBenzMaxim 0:33d4e66780c0 63 }
IanBenzMaxim 0:33d4e66780c0 64 #define _SL_ERROR(expr, error) { if(!(expr)){return (error); } }
IanBenzMaxim 0:33d4e66780c0 65
IanBenzMaxim 0:33d4e66780c0 66 #define SL_HANDLING_ASSERT 2
IanBenzMaxim 0:33d4e66780c0 67 #define SL_HANDLING_ERROR 1
IanBenzMaxim 0:33d4e66780c0 68 #define SL_HANDLING_NONE 0
IanBenzMaxim 0:33d4e66780c0 69
IanBenzMaxim 0:33d4e66780c0 70
IanBenzMaxim 0:33d4e66780c0 71 #ifndef SL_TINY_EXT
IanBenzMaxim 0:33d4e66780c0 72
IanBenzMaxim 0:33d4e66780c0 73 #if 1
IanBenzMaxim 0:33d4e66780c0 74 #define SL_SELF_COND_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 75 #define SL_PROTOCOL_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 76 #define SL_DRV_RET_CODE_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 77 #define SL_NWP_IF_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 78 #define SL_OSI_RET_OK_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 79 #define SL_MALLOC_OK_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 80 #define SL_USER_ARGS_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 81 #define SL_ERR_IN_PROGRESS_HANDLING SL_HANDLING_ERROR
IanBenzMaxim 0:33d4e66780c0 82 #endif
IanBenzMaxim 0:33d4e66780c0 83
IanBenzMaxim 0:33d4e66780c0 84 #else
IanBenzMaxim 0:33d4e66780c0 85 #define SL_SELF_COND_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 86 #define SL_PROTOCOL_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 87 #define SL_DRV_RET_CODE_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 88 #define SL_NWP_IF_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 89 #define SL_OSI_RET_OK_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 90 #define SL_MALLOC_OK_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 91 #define SL_USER_ARGS_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 92 #define SL_ERR_IN_PROGRESS_HANDLING SL_HANDLING_NONE
IanBenzMaxim 0:33d4e66780c0 93 #endif
IanBenzMaxim 0:33d4e66780c0 94
IanBenzMaxim 0:33d4e66780c0 95
IanBenzMaxim 0:33d4e66780c0 96 #if (SL_ERR_IN_PROGRESS_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 97 #define VERIFY_NO_ERROR_HANDLING_IN_PROGRESS() { \
IanBenzMaxim 0:33d4e66780c0 98 if ( g_bDeviceRestartIsRequired == (_u8)TRUE) return SL_API_ABORTED; }
IanBenzMaxim 0:33d4e66780c0 99 #else
IanBenzMaxim 0:33d4e66780c0 100 #define VERIFY_NO_ERROR_HANDLING_IN_PROGRESS()
IanBenzMaxim 0:33d4e66780c0 101 #endif
IanBenzMaxim 0:33d4e66780c0 102 #if (SL_DRV_RET_CODE_HANDLING == SL_HANDLING_ASSERT)
IanBenzMaxim 0:33d4e66780c0 103 #define VERIFY_RET_OK(Func) {_SlReturnVal_t _RetVal = (Func); _SL_ASSERT((_SlReturnVal_t)SL_OS_RET_CODE_OK == _RetVal)}
IanBenzMaxim 0:33d4e66780c0 104 #elif (SL_DRV_RET_CODE_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 105 #define VERIFY_RET_OK(Func) {_SlReturnVal_t _RetVal = (Func); if (SL_OS_RET_CODE_OK != _RetVal) return _RetVal;}
IanBenzMaxim 0:33d4e66780c0 106 #else
IanBenzMaxim 0:33d4e66780c0 107 #define VERIFY_RET_OK(Func) (Func);
IanBenzMaxim 0:33d4e66780c0 108 #endif
IanBenzMaxim 0:33d4e66780c0 109
IanBenzMaxim 0:33d4e66780c0 110 #if (SL_PROTOCOL_HANDLING == SL_HANDLING_ASSERT)
IanBenzMaxim 0:33d4e66780c0 111 #define VERIFY_PROTOCOL(expr) _SL_ASSERT(expr)
IanBenzMaxim 0:33d4e66780c0 112 #elif (SL_PROTOCOL_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 113 #define VERIFY_PROTOCOL(expr) _SL_ERROR(expr, SL_RET_CODE_PROTOCOL_ERROR)
IanBenzMaxim 0:33d4e66780c0 114 #else
IanBenzMaxim 0:33d4e66780c0 115 #define VERIFY_PROTOCOL(expr)
IanBenzMaxim 0:33d4e66780c0 116 #endif
IanBenzMaxim 0:33d4e66780c0 117
IanBenzMaxim 0:33d4e66780c0 118 #if (defined(PROTECT_SOCKET_ASYNC_RESP) && (SL_SELF_COND_HANDLING == SL_HANDLING_ASSERT))
IanBenzMaxim 0:33d4e66780c0 119 #define VERIFY_SOCKET_CB(expr) _SL_ASSERT(expr)
IanBenzMaxim 0:33d4e66780c0 120 #elif (defined(PROTECT_SOCKET_ASYNC_RESP) && (SL_SELF_COND_HANDLING == SL_HANDLING_ERROR))
IanBenzMaxim 0:33d4e66780c0 121 #define VERIFY_SOCKET_CB(expr) _SL_ERROR(expr, SL_RET_CODE_SELF_ERROR)
IanBenzMaxim 0:33d4e66780c0 122 #else
IanBenzMaxim 0:33d4e66780c0 123 #define VERIFY_SOCKET_CB(expr)
IanBenzMaxim 0:33d4e66780c0 124 #endif
IanBenzMaxim 0:33d4e66780c0 125
IanBenzMaxim 0:33d4e66780c0 126 #if (SL_NWP_IF_HANDLING == SL_HANDLING_ASSERT)
IanBenzMaxim 0:33d4e66780c0 127 #define NWP_IF_WRITE_CHECK(fd,pBuff,len) { _i16 RetSize, ExpSize = (_i16)(len); RetSize = sl_IfWrite((fd),(pBuff),ExpSize); _SL_ASSERT(ExpSize == RetSize)}
IanBenzMaxim 0:33d4e66780c0 128 #define NWP_IF_READ_CHECK(fd,pBuff,len) { _i16 RetSize, ExpSize = (_i16)(len); RetSize = sl_IfRead((fd),(pBuff),ExpSize); _SL_ASSERT(ExpSize == RetSize)}
IanBenzMaxim 0:33d4e66780c0 129 #elif (SL_NWP_IF_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 130 #define NWP_IF_WRITE_CHECK(fd,pBuff,len) { _SL_ERROR((len == sl_IfWrite((fd),(pBuff),(len))), SL_RET_CODE_NWP_IF_ERROR);}
IanBenzMaxim 0:33d4e66780c0 131 #define NWP_IF_READ_CHECK(fd,pBuff,len) { _SL_ERROR((len == sl_IfRead((fd),(pBuff),(len))), SL_RET_CODE_NWP_IF_ERROR);}
IanBenzMaxim 0:33d4e66780c0 132 #else
IanBenzMaxim 0:33d4e66780c0 133 #define NWP_IF_WRITE_CHECK(fd,pBuff,len) { sl_IfWrite((fd),(pBuff),(len));}
IanBenzMaxim 0:33d4e66780c0 134 #define NWP_IF_READ_CHECK(fd,pBuff,len) { sl_IfRead((fd),(pBuff),(len));}
IanBenzMaxim 0:33d4e66780c0 135 #endif
IanBenzMaxim 0:33d4e66780c0 136
IanBenzMaxim 0:33d4e66780c0 137 #if (SL_OSI_RET_OK_HANDLING == SL_HANDLING_ASSERT)
IanBenzMaxim 0:33d4e66780c0 138 #define OSI_RET_OK_CHECK(Func) {_SlReturnVal_t _RetVal = (Func); _SL_ASSERT((_SlReturnVal_t)SL_OS_RET_CODE_OK == _RetVal)}
IanBenzMaxim 0:33d4e66780c0 139 #elif (SL_OSI_RET_OK_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 140 #define OSI_RET_OK_CHECK(Func) {_SlReturnVal_t _RetVal = (Func); if (SL_OS_RET_CODE_OK != _RetVal) return _RetVal;}
IanBenzMaxim 0:33d4e66780c0 141 #else
IanBenzMaxim 0:33d4e66780c0 142 #define OSI_RET_OK_CHECK(Func) (Func);
IanBenzMaxim 0:33d4e66780c0 143 #endif
IanBenzMaxim 0:33d4e66780c0 144
IanBenzMaxim 0:33d4e66780c0 145 #if (SL_MALLOC_OK_HANDLING == SL_HANDLING_ASSERT)
IanBenzMaxim 0:33d4e66780c0 146 #define MALLOC_OK_CHECK(Ptr) _SL_ASSERT(NULL != Ptr)
IanBenzMaxim 0:33d4e66780c0 147 #elif (SL_MALLOC_OK_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 148 #define MALLOC_OK_CHECK(Ptr) _SL_ERROR((NULL != Ptr), SL_RET_CODE_MALLOC_ERROR)
IanBenzMaxim 0:33d4e66780c0 149 #else
IanBenzMaxim 0:33d4e66780c0 150 #define MALLOC_OK_CHECK(Ptr)
IanBenzMaxim 0:33d4e66780c0 151 #endif
IanBenzMaxim 0:33d4e66780c0 152
IanBenzMaxim 0:33d4e66780c0 153 #ifdef SL_INC_ARG_CHECK
IanBenzMaxim 0:33d4e66780c0 154
IanBenzMaxim 0:33d4e66780c0 155 #if (SL_USER_ARGS_HANDLING == SL_HANDLING_ASSERT)
IanBenzMaxim 0:33d4e66780c0 156 #define ARG_CHECK_PTR(Ptr) _SL_ASSERT(NULL != Ptr)
IanBenzMaxim 0:33d4e66780c0 157 #elif (SL_USER_ARGS_HANDLING == SL_HANDLING_ERROR)
IanBenzMaxim 0:33d4e66780c0 158 #define ARG_CHECK_PTR(Ptr) _SL_ERROR((NULL != Ptr), SL_RET_CODE_INVALID_INPUT)
IanBenzMaxim 0:33d4e66780c0 159 #else
IanBenzMaxim 0:33d4e66780c0 160 #define ARG_CHECK_PTR(Ptr)
IanBenzMaxim 0:33d4e66780c0 161 #endif
IanBenzMaxim 0:33d4e66780c0 162
IanBenzMaxim 0:33d4e66780c0 163 #else
IanBenzMaxim 0:33d4e66780c0 164 #define ARG_CHECK_PTR(Ptr)
IanBenzMaxim 0:33d4e66780c0 165 #endif
IanBenzMaxim 0:33d4e66780c0 166
IanBenzMaxim 0:33d4e66780c0 167 /*#define SL_DBG_TRACE_ENABLE*/
IanBenzMaxim 0:33d4e66780c0 168 #ifdef SL_DBG_TRACE_ENABLE
IanBenzMaxim 0:33d4e66780c0 169 #define SL_TRACE0(level,msg_id,str) printf(str)
IanBenzMaxim 0:33d4e66780c0 170 #define SL_TRACE1(level,msg_id,str,p1) printf(str,(p1))
IanBenzMaxim 0:33d4e66780c0 171 #define SL_TRACE2(level,msg_id,str,p1,p2) printf(str,(p1),(p2))
IanBenzMaxim 0:33d4e66780c0 172 #define SL_TRACE3(level,msg_id,str,p1,p2,p3) printf(str,(p1),(p2),(p3))
IanBenzMaxim 0:33d4e66780c0 173 #define SL_TRACE4(level,msg_id,str,p1,p2,p3,p4) printf(str,(p1),(p2),(p3),(p4))
IanBenzMaxim 0:33d4e66780c0 174 #define SL_ERROR_TRACE(msg_id,str) printf(str)
IanBenzMaxim 0:33d4e66780c0 175 #define SL_ERROR_TRACE1(msg_id,str,p1) printf(str,(p1))
IanBenzMaxim 0:33d4e66780c0 176 #define SL_ERROR_TRACE2(msg_id,str,p1,p2) printf(str,(p1),(p2))
IanBenzMaxim 0:33d4e66780c0 177 #define SL_ERROR_TRACE3(msg_id,str,p1,p2,p3) printf(str,(p1),(p2),(p3))
IanBenzMaxim 0:33d4e66780c0 178 #define SL_ERROR_TRACE4(msg_id,str,p1,p2,p3,p4) printf(str,(p1),(p2),(p3),(p4))
IanBenzMaxim 0:33d4e66780c0 179 #define SL_TRACE_FLUSH()
IanBenzMaxim 0:33d4e66780c0 180 #else
IanBenzMaxim 0:33d4e66780c0 181 #define SL_TRACE0(level,msg_id,str)
IanBenzMaxim 0:33d4e66780c0 182 #define SL_TRACE1(level,msg_id,str,p1)
IanBenzMaxim 0:33d4e66780c0 183 #define SL_TRACE2(level,msg_id,str,p1,p2)
IanBenzMaxim 0:33d4e66780c0 184 #define SL_TRACE3(level,msg_id,str,p1,p2,p3)
IanBenzMaxim 0:33d4e66780c0 185 #define SL_TRACE4(level,msg_id,str,p1,p2,p3,p4)
IanBenzMaxim 0:33d4e66780c0 186 #define SL_ERROR_TRACE(msg_id,str)
IanBenzMaxim 0:33d4e66780c0 187 #define SL_ERROR_TRACE1(msg_id,str,p1)
IanBenzMaxim 0:33d4e66780c0 188 #define SL_ERROR_TRACE2(msg_id,str,p1,p2)
IanBenzMaxim 0:33d4e66780c0 189 #define SL_ERROR_TRACE3(msg_id,str,p1,p2,p3)
IanBenzMaxim 0:33d4e66780c0 190 #define SL_ERROR_TRACE4(msg_id,str,p1,p2,p3,p4)
IanBenzMaxim 0:33d4e66780c0 191 #define SL_TRACE_FLUSH()
IanBenzMaxim 0:33d4e66780c0 192 #endif
IanBenzMaxim 0:33d4e66780c0 193
IanBenzMaxim 0:33d4e66780c0 194 /* #define SL_DBG_CNT_ENABLE */
IanBenzMaxim 0:33d4e66780c0 195 #ifdef SL_DBG_CNT_ENABLE
IanBenzMaxim 0:33d4e66780c0 196 #define _SL_DBG_CNT_INC(Cnt) g_DbgCnt. ## Cnt++
IanBenzMaxim 0:33d4e66780c0 197 #define _SL_DBG_SYNC_LOG(index,value) {if(index < SL_DBG_SYNC_LOG_SIZE){*(_u32 *)&g_DbgCnt.SyncLog[index] = *(_u32 *)(value);}}
IanBenzMaxim 0:33d4e66780c0 198
IanBenzMaxim 0:33d4e66780c0 199 #else
IanBenzMaxim 0:33d4e66780c0 200 #define _SL_DBG_CNT_INC(Cnt)
IanBenzMaxim 0:33d4e66780c0 201 #define _SL_DBG_SYNC_LOG(index,value)
IanBenzMaxim 0:33d4e66780c0 202 #endif
IanBenzMaxim 0:33d4e66780c0 203
IanBenzMaxim 0:33d4e66780c0 204 #define SL_DBG_LEVEL_1 1
IanBenzMaxim 0:33d4e66780c0 205 #define SL_DBG_LEVEL_2 2
IanBenzMaxim 0:33d4e66780c0 206 #define SL_DBG_LEVEL_3 4
IanBenzMaxim 0:33d4e66780c0 207 #define SL_DBG_LEVEL_MASK (SL_DBG_LEVEL_2|SL_DBG_LEVEL_3)
IanBenzMaxim 0:33d4e66780c0 208
IanBenzMaxim 0:33d4e66780c0 209 #define SL_INCLUDE_DBG_FUNC(Name) ((Name ## _DBG_LEVEL) & SL_DBG_LEVEL_MASK)
IanBenzMaxim 0:33d4e66780c0 210
IanBenzMaxim 0:33d4e66780c0 211 #define _SlDrvPrintStat_DBG_LEVEL SL_DBG_LEVEL_3
IanBenzMaxim 0:33d4e66780c0 212 #define _SlDrvOtherFunc_DBG_LEVEL SL_DBG_LEVEL_1
IanBenzMaxim 0:33d4e66780c0 213
IanBenzMaxim 0:33d4e66780c0 214 #ifdef __cplusplus
IanBenzMaxim 0:33d4e66780c0 215 }
IanBenzMaxim 0:33d4e66780c0 216 #endif
IanBenzMaxim 0:33d4e66780c0 217
IanBenzMaxim 0:33d4e66780c0 218
IanBenzMaxim 0:33d4e66780c0 219 #endif /*__SIMPLELINK_TRACE_H__*/
IanBenzMaxim 0:33d4e66780c0 220