Skip to content

Commit

Permalink
Merge pull request #200 from mcci-catena/issue199
Browse files Browse the repository at this point in the history
Fix #199: Add wrapper for the config headers
  • Loading branch information
terrillmoore authored Nov 29, 2018
2 parents c208277 + dc9fd37 commit 23e6d5e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The [MCCI arduino-lorawan](https://github.com/mcci-catena/arduino-lorawan) libra
This library requires Arduino IDE version 1.6.6 or above, since it
requires C99 mode to be enabled by default.

[![GitHub release](https://img.shields.io/github/release/mcci-catena/arduino-lmic.svg)](https://github.com/mcci-catena/arduino-lmic/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/arduino-lmic/latest.svg)](https://github.com/mcci-catena/arduino-lmic/compare/v2.3.0...master) [![Build Status](https://travis-ci.com/mcci-catena/arduino-lmic.svg?branch=master)](https://travis-ci.com/mcci-catena/arduino-lmic)
[![GitHub release](https://img.shields.io/github/release/mcci-catena/arduino-lmic.svg)](https://github.com/mcci-catena/arduino-lmic/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/arduino-lmic/latest.svg)](https://github.com/mcci-catena/arduino-lmic/compare/v2.3.1...master) [![Build Status](https://travis-ci.com/mcci-catena/arduino-lmic.svg?branch=master)](https://travis-ci.com/mcci-catena/arduino-lmic)

**Contents:**

Expand Down Expand Up @@ -1009,6 +1009,8 @@ function uflt122f(rawUflt12)

## Release History

- v2.3.1 is a patch release. It adds `<arduino_lmic_user_configuration.h>`, which loads the pre-proceesor LMIC configuration variables into scope (issue [#199](https://github.com/mcci-catena/arduino-lmic/issues/199)).

- v2.3.0 introduces two important changes.

1. The pinmap is extended with an additional field `pConfig`, pointing to a C++ class instance. This instance, if provided, has extra methods for dealing with TCXO control and other fine details of operating the radio. It also gives a natural way for us to extend the behavior of the HAL.
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MCCI LoRaWAN LMIC library
version=2.3.0
version=2.3.1
author=IBM, Matthis Kooijman, Terry Moore, ChaeHee Won, Frank Rose
maintainer=Terry Moore <tmm@mcci.com>
sentence=Arduino port of the LMIC (LoraWAN-MAC-in-C) framework provided by IBM.
Expand Down
30 changes: 30 additions & 0 deletions src/arduino_lmic_user_configuration.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Module: arduino_lmic_user_configuration.h
Function:
Get the Arduino-LMIC configuration into scope
Copyright & License:
See accompanying LICENSE file.
Author:
Terry Moore, MCCI November 2018
*/
#pragma once

#ifndef _arduino_lmic_user_configuration_h_
# define _arduino_lmic_user_configuration_h_

# ifdef __cplusplus
extern "C" {
# endif

# include "lmic/lmic_config_preconditions.h"

# ifdef __cplusplus
}
# endif

#endif /* _arduino_lmic_user_configuration_h_ */
2 changes: 1 addition & 1 deletion src/lmic/lmic.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extern "C"{
#define ARDUINO_LMIC_VERSION_CALC(major, minor, patch, local) \
(((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local))

#define ARDUINO_LMIC_VERSION ARDUINO_LMIC_VERSION_CALC(2, 3, 0, 0) /* v2.3.0 */
#define ARDUINO_LMIC_VERSION ARDUINO_LMIC_VERSION_CALC(2, 3, 1, 0) /* v2.3.1 */

#define ARDUINO_LMIC_VERSION_GET_MAJOR(v) \
(((v) >> 24u) & 0xFFu)
Expand Down

0 comments on commit 23e6d5e

Please sign in to comment.