summaryrefslogtreecommitdiff
path: root/src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-09-23 22:22:47 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-09-23 22:22:47 +0200
commit8578e1ea7d078b60864b084094dbb02b6cac99c3 (patch)
tree19a02eef376f5b89c7044c48dcc0c0f43ea9d416 /src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h
parent30a29dcd0d064ab8403a9afb32c59800bb346840 (diff)
Import partially adapted MCCI LoRaWAN LMIC library. Needs further work.
Diffstat (limited to 'src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h')
-rw-r--r--src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h b/src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h
new file mode 100644
index 0000000..2339540
--- /dev/null
+++ b/src/lib/MCCI_LoRaWAN_LMIC_library/src/hal/hal.h
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2015-2016 Matthijs Kooijman
+ * Copyright (c) 2016-2018 MCCI Corporation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * This the HAL to run LMIC on top of the Arduino environment.
+ *******************************************************************************/
+#ifndef _hal_hal_h_
+#define _hal_hal_h_
+
+#include "arduino_lmic_hal_configuration.h"
+
+// for compatbility reasons, we need to disclose the configuration
+// structure as global type lmic_pinmap.
+using lmic_pinmap = Multipass_LMIC::HalPinmap_t;
+
+// similarly, we need to disclose NUM_DIO and LMIC_UNUSED_PIN
+static const int NUM_DIO = lmic_pinmap::NUM_DIO;
+
+// Use this for any unused pins.
+const u1_t LMIC_UNUSED_PIN = lmic_pinmap::UNUSED_PIN;
+
+// Declared here, to be defined and initialized by the application.
+// Use os_init_ex() if you want not to use a const table, or if
+// you need to define a derived type (so you can override methods).
+extern const lmic_pinmap lmic_pins;
+
+#endif // _hal_hal_h_