summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h')
-rw-r--r--Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h b/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h
new file mode 100644
index 0000000..b325848
--- /dev/null
+++ b/Bachelor/Mikroprozessorsysteme2/mi2/Termin2/Loesung/defines.h
@@ -0,0 +1,16 @@
+// Power Management Controller (Atmel Docu S. 139)
+#define PMC_PCER ((volatile unsigned int*) 0xFFFF4010) // Peripheral Clock Enable Register
+#define PCER_PIOA 0x2000 // PIOA: PIOA Clock. Enable
+#define PCER_PIOB 0x4000 // PIOB: PIOB Clock. Enable
+#define PMC_PCDR ((volatile unsigned int*) 0xFFFF4014) // Peripheral Clock Disable Register
+
+
+/*****************************************************************************/
+// Parallel I/O Controller B (Atmel Docu S. 59)
+#define PIOB_PER ((volatile unsigned int*) 0xFFFF0000) // Enable Register (Atmel Docu S. 60)
+#define PIOB_PDR ((volatile unsigned int*) 0xFFFF0004) // Disable Register (Atmel Docu S. 60)
+#define PIOB_SODR ((volatile unsigned int*) 0xFFFF0030) // Set Output Data Register (Atmel Docu S. 66)
+#define PIOB_CODR ((volatile unsigned int*) 0xFFFF0034) // Clear Output Data Register (Atmel Docu S. 66)
+#define PIOB_OER ((volatile unsigned int*) 0xFFFF0010) // Output Enable Register (Atmel Docu S. 62)
+#define PIOB_ODR ((volatile unsigned int*) 0xFFFF0014) // Output Disable Register (Atmel Docu S.62)
+#define PIOB_PDSR ((volatile unsigned int*) 0xFFFF003C) // Pin Data Status Register (Atmel Docu S.67)