aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Mignot <victor@vmignot.fr>2026-01-29 22:30:19 +0100
committerVictor Mignot <victor@vmignot.fr>2026-01-29 22:30:19 +0100
commit37df6e52689683884da86dc9c0bd8bb226c55a51 (patch)
tree3e40856e182eb39f63e1292ed0136b6d85142779
parentc2213325850375670c9828839dd95a6f746b309f (diff)
downloadnanji-37df6e52689683884da86dc9c0bd8bb226c55a51.tar.gz
[WIP] nrf528322: add spi driverHEADmain
-rw-r--r--src/spi.c31
-rw-r--r--src/spi.h5
2 files changed, 36 insertions, 0 deletions
diff --git a/src/spi.c b/src/spi.c
new file mode 100644
index 0000000..f6bfc0f
--- /dev/null
+++ b/src/spi.c
@@ -0,0 +1,31 @@
+#include "spi.h"
+
+enum spi_register {
+ TASKS_START = 0x10,
+ TASKS_STOP = 0x14,
+ TASKS_SUSPEND = 0x1c,
+ TASKS_RESUME = 0x20,
+ EVENTS_STOPPED = 0x104,
+ EVENTS_ENDRX = 0x110,
+ EVENTS_END = 0x118,
+ EVENTS_ENDTX = 0x120,
+ EVENTS_STARTED = 0x14c,
+ SHORTS = 0x200,
+ INTENSET = 0x304,
+ INTENCLR = 0x308,
+ ENABLE = 0x500,
+ PSEL_SCK = 0x508,
+ PSEL_MOSI = 0x50c,
+ PSEL_MISO = 0x510,
+ FREQUENCY = 0x524,
+ RXD_PTR = 0x534,
+ RXD_MAXCNT = 0x538,
+ RXD_AMOUNT = 0x53c,
+ RXD_LIST = 0x540,
+ TXD_PTR = 0x544,
+ TXD_MAXCNT = 0x548,
+ TXD_AMOUNT = 0x54c,
+ TXD_LIST = 0x550,
+ CONFIG = 0x544,
+ ORC = 0x5c0,
+};
diff --git a/src/spi.h b/src/spi.h
new file mode 100644
index 0000000..137e78b
--- /dev/null
+++ b/src/spi.h
@@ -0,0 +1,5 @@
+#ifndef SPI_H
+#define SPI_H
+
+
+#endif