summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/cam.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-08-09 22:23:08 +0200
committerUros Majstorovic <majstor@majstor.org>2022-08-09 22:23:08 +0200
commit3f913efda03fd840cd526ef72e6f397c7da61bd7 (patch)
tree08f62c93e0e0660fdb7beba32276ff1ceb7a8a3c /fw/fe310/eos/dev/cam.c
parent810dde21ee65653c15606917b19566cfbaaf165e (diff)
code layout
Diffstat (limited to 'fw/fe310/eos/dev/cam.c')
-rw-r--r--fw/fe310/eos/dev/cam.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fw/fe310/eos/dev/cam.c b/fw/fe310/eos/dev/cam.c
index 43293af..50a0bdd 100644
--- a/fw/fe310/eos/dev/cam.c
+++ b/fw/fe310/eos/dev/cam.c
@@ -2,7 +2,9 @@
#include <stdint.h>
#include "eos.h"
-#include "spi.h"
+
+#include "soc/spi.h"
+
#include "cam.h"
const int _eos_cam_resolution[][2] = {
@@ -105,7 +107,7 @@ int eos_cam_capture_done(void) {
void eos_cam_capture_wait(void) {
int done = 0;
-
+
while (!done) {
done = eos_cam_capture_done();
}
@@ -113,7 +115,7 @@ void eos_cam_capture_wait(void) {
uint32_t eos_cam_fbuf_size(void) {
uint32_t ret;
-
+
ret = reg_read(CAM_REG_FIFO_SIZE1);
ret |= reg_read(CAM_REG_FIFO_SIZE2) << 8;
ret |= (reg_read(CAM_REG_FIFO_SIZE3) & 0x7f) << 16;
@@ -122,7 +124,7 @@ uint32_t eos_cam_fbuf_size(void) {
void eos_cam_fbuf_read(uint8_t *buffer, uint16_t sz, int first) {
int i;
-
+
eos_spi_cs_set();
eos_spi_xchg8(CAM_REG_READ_BURST, 0);
if (first) eos_spi_xchg8(0, 0);