Skip to content

Commit 05037a1

Browse files
authored
Merge pull request #276 from brilliantlabsAR/camera-power-saving
Camera dphy power saving
2 parents 08f3344 + 402b7ea commit 05037a1

File tree

6 files changed

+23316
-23359
lines changed

6 files changed

+23316
-23359
lines changed

source/application/lua_libraries/camera.c

+3
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ static int lua_camera_power_save(lua_State *L)
685685
check_error(i2c_write(CAMERA, 0x3659, 0xFF, 0xFF).fail);
686686
check_error(i2c_write(CAMERA, 0x365A, 0xFF, 0xFF).fail);
687687
check_error(i2c_write(CAMERA, 0x308B, 0xFF, 0x01).fail);
688+
spi_write(FPGA, 0x28, (uint8_t *)"\x01", 1);
688689
}
689690
else
690691
{
@@ -693,8 +694,10 @@ static int lua_camera_power_save(lua_State *L)
693694
check_error(i2c_write(CAMERA, 0x365A, 0xFF, 0x02).fail);
694695
check_error(i2c_write(CAMERA, 0x308B, 0xFF, 0x00).fail);
695696
check_error(i2c_write(CAMERA, 0x0100, 0xFF, 0x01).fail);
697+
spi_write(FPGA, 0x28, (uint8_t *)"\x00", 1);
696698
camera_is_asleep = false;
697699
}
700+
698701
return 0;
699702
}
700703

0 commit comments

Comments
 (0)