summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/hpamp.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-02-16 20:17:07 +0100
committerUros Majstorovic <majstor@majstor.org>2025-02-16 20:17:07 +0100
commit2e17dd17ee9777084b2f211f08c4231dd5f8b906 (patch)
treef50ad99c62d81906082cbb28eb84d857ef7311c9 /fw/fe310/eos/dev/hpamp.c
parent064631db87182694459056ceeb331506b553d0f0 (diff)
extended gpio implemented
Diffstat (limited to 'fw/fe310/eos/dev/hpamp.c')
-rw-r--r--fw/fe310/eos/dev/hpamp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/fw/fe310/eos/dev/hpamp.c b/fw/fe310/eos/dev/hpamp.c
new file mode 100644
index 0000000..10a95fa
--- /dev/null
+++ b/fw/fe310/eos/dev/hpamp.c
@@ -0,0 +1,22 @@
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "eos.h"
+
+#include "soc/spi.h"
+#include "spi.h"
+
+#include "drv/pcm1770.h"
+#include "hpamp.h"
+
+int eos_hpamp_init(void) {
+ int rv;
+
+ rv = eos_spi_select(EOS_SPI_DEV_HPAMP);
+ if (rv) return rv;
+
+ pcm1770_reg_write(0x03, 0x01);
+ eos_spi_deselect();
+
+ return EOS_OK;
+}