summaryrefslogtreecommitdiff
path: root/lora-test
diff options
context:
space:
mode:
Diffstat (limited to 'lora-test')
-rw-r--r--lora-test/Makefile34
-rw-r--r--lora-test/lora-test.cpp45
2 files changed, 79 insertions, 0 deletions
diff --git a/lora-test/Makefile b/lora-test/Makefile
new file mode 100644
index 0000000..8b2dc08
--- /dev/null
+++ b/lora-test/Makefile
@@ -0,0 +1,34 @@
+##
+## spreadspace avr utils
+##
+##
+## Copyright (C) 2013-2018 Christian Pointner <equinox@spreadspace.org>
+##
+## This file is part of spreadspace avr utils.
+##
+## spreadspace avr utils is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## any later version.
+##
+## spreadspace avr utils is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with spreadspace avr utils. If not, see <http://www.gnu.org/licenses/>.
+##
+
+NAME := lora-test
+BOARD_TYPE := elecrow32u4lora
+CXX_OBJ := $(NAME).o
+LIBS := util led
+EXTERNAL_LIBS := radiohead
+SPREADAVR_PATH := ..
+
+RADIOHEAD_PATH := $(SPREADAVR_PATH)/contrib/RadioHead
+
+RADIOHEAD_DRIVER := RF95
+
+include $(SPREADAVR_PATH)/include.mk
diff --git a/lora-test/lora-test.cpp b/lora-test/lora-test.cpp
new file mode 100644
index 0000000..665e762
--- /dev/null
+++ b/lora-test/lora-test.cpp
@@ -0,0 +1,45 @@
+/*
+ * spreadspace avr utils
+ *
+ *
+ * Copyright (C) 2013-2016 Christian Pointner <equinox@spreadspace.org>
+ *
+ * This file is part of spreadspace avr utils.
+ *
+ * spreadspace avr utils is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * spreadspace avr utils is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with spreadspace avr utils. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <avr/io.h>
+#include <avr/wdt.h>
+#include <avr/interrupt.h>
+#include <avr/power.h>
+#include <stdio.h>
+
+#include "util.h"
+#include "led.h"
+#include "RadioHead.h"
+
+int main(void)
+{
+ MCUSR &= ~(1 << WDRF);
+ wdt_disable();
+
+ cpu_init();
+ led_init();
+ sei();
+
+ for(;;) {
+ // for now we don't do anything here...
+ }
+}