From 3f913efda03fd840cd526ef72e6f397c7da61bd7 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 9 Aug 2022 22:23:08 +0200 Subject: code layout --- fw/fe310/eos/dev/cam.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'fw/fe310/eos/dev/cam.c') 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 #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); -- cgit v1.2.3