summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/cam.c
diff options
context:
space:
mode:
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);