summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-03-18 22:01:06 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-03-18 22:01:06 +0100
commitde23a47009bb301518417d097b3360253a01c635 (patch)
treeefbe470365a62c52345b6d3fd100f338f3cf2ad7 /include
parent7588f9c2ada3f4b10586826ee95eb8795fb69729 (diff)
Arduino: Add ADC driver
Diffstat (limited to 'include')
-rw-r--r--include/arch/arduino-nano/driver/adc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/arch/arduino-nano/driver/adc.h b/include/arch/arduino-nano/driver/adc.h
new file mode 100644
index 0000000..4af64b8
--- /dev/null
+++ b/include/arch/arduino-nano/driver/adc.h
@@ -0,0 +1,17 @@
+#ifndef ADC_H
+#define ADC_H
+
+class AVRADC {
+ private:
+ AVRADC(AVRADC const &copy);
+
+ public:
+ AVRADC() {}
+
+ int16_t getTemp_mdegC(int16_t offset = 205);
+ uint16_t getVCC_mV();
+};
+
+extern AVRADC adc;
+
+#endif