LoRaWAN Class A node example based on IBM LoRa MAC in C (LMiC) implementation

Dependencies:   LMiC SX1276Lib mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers debug.h Source File

debug.h

00001 /*******************************************************************************
00002  * Copyright (c) 2014-2015 IBM Corporation.
00003  * All rights reserved. This program and the accompanying materials
00004  * are made available under the terms of the Eclipse Public License v1.0
00005  * which accompanies this distribution, and is available at
00006  * http://www.eclipse.org/legal/epl-v10.html
00007  *
00008  * Contributors:
00009  *    IBM Zurich Research Lab - initial API, implementation and documentation
00010  *    Semtech Apps Team       - Adapted for MBED
00011  *******************************************************************************/
00012 #ifndef _debug_hpp_
00013 #define _debug_hpp_
00014 
00015 // intialize debug library
00016 void debug_init (void);
00017 
00018 // set LED state
00019 void debug_led (u1_t val);
00020 
00021 // write character to USART
00022 void debug_char (u1_t c);
00023 
00024 // write byte as two hex digits to USART
00025 void debug_hex (u1_t b);
00026 
00027 // write buffer as hex dump to USART
00028 void debug_buf (const u1_t* buf, u2_t len);
00029 
00030 // write 32-bit integer as eight hex digits to USART
00031 void debug_uint (u4_t v);
00032 
00033 // write nul-terminated string to USART
00034 void debug_str (const u1_t* str);
00035 
00036 // write LMiC event name to USART
00037 void debug_event (int ev);
00038 
00039 // write label and 32-bit value as hex to USART
00040 void debug_val (const u1_t* label, u4_t val);
00041 
00042 #endif // _debug_hpp_