summaryrefslogtreecommitdiff
path: root/adc/stm32_opamp.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2022-09-10 17:07:52 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-09-10 17:07:52 +0200
commit59b94427c591e7ec4603b2d9dd6753b1b0927175 (patch)
treeeee654fdaecafce1663b8fde667453f81766fc2c /adc/stm32_opamp.h
parent2ea5b06c6b5f7ef7c29547dc44f279f4709d2eed (diff)
stm32g4: Add OPAMP.
Diffstat (limited to 'adc/stm32_opamp.h')
-rw-r--r--adc/stm32_opamp.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/adc/stm32_opamp.h b/adc/stm32_opamp.h
new file mode 100644
index 0000000..928bd0c
--- /dev/null
+++ b/adc/stm32_opamp.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <mmio/mmio.h>
+
+struct STM32_OPAMP_reg_t {
+ volatile uint32_t CSR1;
+ volatile uint32_t CSR2;
+ volatile uint32_t CSR3;
+ volatile uint32_t CSR4;
+ volatile uint32_t CSR5;
+ volatile uint32_t CSR6;
+ volatile uint32_t TCMR1;
+ volatile uint32_t TCMR2;
+ volatile uint32_t TCMR3;
+ volatile uint32_t TCMR4;
+ volatile uint32_t TCMR5;
+ volatile uint32_t TCMR6;
+};
+
+class STM32_OPAMP_t : public mmio_ptr<STM32_OPAMP_reg_t> {
+ public:
+ using mmio_ptr<STM32_OPAMP_reg_t>::ptr;
+};