works with TTN and cheap STM32F103C8T6 boards
Dependencies: LMiC_CFG_eu868 SX1276Lib mbed-STM32F103C8T6 mbed
Fork of LoRaWAN-lmic-app by
STM32F103C8T6 + RFM95 LoRa Node
flash board wirh STLink
openocd -f interface/stlink-v2.cfg -f target/stm32f1x_stlink.cfg \ -c "program STM32F103C8T6_LoRaWAN-lmic-app_NUCLEO_F103RB.bin exit verify reset 0x08000000"
debug.h@7:4fd11bbd131e, 2016-11-10 (annotated)
- Committer:
- orangeway
- Date:
- Thu Nov 10 23:21:44 2016 +0000
- Revision:
- 7:4fd11bbd131e
- Parent:
- 1:60184eda0066
works with TTN and cheap STM32F103C8T6 boards
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mluis | 1:60184eda0066 | 1 | /******************************************************************************* |
mluis | 1:60184eda0066 | 2 | * Copyright (c) 2014-2015 IBM Corporation. |
mluis | 1:60184eda0066 | 3 | * All rights reserved. This program and the accompanying materials |
mluis | 1:60184eda0066 | 4 | * are made available under the terms of the Eclipse Public License v1.0 |
mluis | 1:60184eda0066 | 5 | * which accompanies this distribution, and is available at |
mluis | 1:60184eda0066 | 6 | * http://www.eclipse.org/legal/epl-v10.html |
mluis | 1:60184eda0066 | 7 | * |
mluis | 1:60184eda0066 | 8 | * Contributors: |
mluis | 1:60184eda0066 | 9 | * IBM Zurich Research Lab - initial API, implementation and documentation |
mluis | 1:60184eda0066 | 10 | * Semtech Apps Team - Adapted for MBED |
mluis | 1:60184eda0066 | 11 | *******************************************************************************/ |
mluis | 1:60184eda0066 | 12 | #ifndef _debug_hpp_ |
mluis | 1:60184eda0066 | 13 | #define _debug_hpp_ |
mluis | 1:60184eda0066 | 14 | |
mluis | 1:60184eda0066 | 15 | // intialize debug library |
mluis | 1:60184eda0066 | 16 | void debug_init (void); |
mluis | 1:60184eda0066 | 17 | |
mluis | 1:60184eda0066 | 18 | // set LED state |
mluis | 1:60184eda0066 | 19 | void debug_led (u1_t val); |
mluis | 1:60184eda0066 | 20 | |
mluis | 1:60184eda0066 | 21 | // write character to USART |
mluis | 1:60184eda0066 | 22 | void debug_char (u1_t c); |
mluis | 1:60184eda0066 | 23 | |
mluis | 1:60184eda0066 | 24 | // write byte as two hex digits to USART |
mluis | 1:60184eda0066 | 25 | void debug_hex (u1_t b); |
mluis | 1:60184eda0066 | 26 | |
mluis | 1:60184eda0066 | 27 | // write buffer as hex dump to USART |
mluis | 1:60184eda0066 | 28 | void debug_buf (const u1_t* buf, u2_t len); |
mluis | 1:60184eda0066 | 29 | |
mluis | 1:60184eda0066 | 30 | // write 32-bit integer as eight hex digits to USART |
mluis | 1:60184eda0066 | 31 | void debug_uint (u4_t v); |
mluis | 1:60184eda0066 | 32 | |
mluis | 1:60184eda0066 | 33 | // write nul-terminated string to USART |
mluis | 1:60184eda0066 | 34 | void debug_str (const u1_t* str); |
mluis | 1:60184eda0066 | 35 | |
mluis | 1:60184eda0066 | 36 | // write LMiC event name to USART |
mluis | 1:60184eda0066 | 37 | void debug_event (int ev); |
mluis | 1:60184eda0066 | 38 | |
mluis | 1:60184eda0066 | 39 | // write label and 32-bit value as hex to USART |
mluis | 1:60184eda0066 | 40 | void debug_val (const u1_t* label, u4_t val); |
mluis | 1:60184eda0066 | 41 | |
mluis | 1:60184eda0066 | 42 | #endif // _debug_hpp_ |