Skip to content

Commit

Permalink
Fix libc printf on non-AVR for Arduino core 1.8.x
Browse files Browse the repository at this point in the history
With debugging enabled, LMIC wouldn't compile on SAMD targets when used with Arduino core greater than 1.6.21 (eg 1.8.x versions). Changing the order of includes fixes this. Suggested by matthijskooiman in upstream matthijskooijman#270.
  • Loading branch information
JeroenvIS authored Mar 3, 2020
1 parent 54bc51d commit 42f4eb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hal/hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* This the HAL to run LMIC on top of the Arduino environment.
*******************************************************************************/

#define _GNU_SOURCE 1 // For fopencookie
#include <stdio.h>
#undef _GNU_SOURCE
#include <Arduino.h>
#include <SPI.h>
#include "../lmic.h"
#include "hal.h"
#define _GNU_SOURCE 1 // For fopencookie
#include <stdio.h>
#undef _GNU_SOURCE

// -----------------------------------------------------------------------------
// I/O
Expand Down

0 comments on commit 42f4eb0

Please sign in to comment.