Hmm, so looking at the code, I see this function in camera.cpp
:
int32_t cam_setMode(const uint8_t &mode)
{
if (mode!=g_mode)
{
if (mode==0)
{
cam_setRegs(g_mode0Regs, sizeof(g_mode0Regs));
g_mode = 0;
}
else if (mode==1)
{
cam_setRegs(g_mode1Regs, sizeof(g_mode1Regs));
g_mode = 1;
}
else
return -1;
}
return 0;
}
And in cameravals.h
I see:
#define CAM_MODE0 0x00
#define CAM_MODE1 0x01
...
#define CAM_RES0 0x00
#define CAM_RES1 0x01
#define CAM_RES2 0x02
#define CAM_RES0_WIDTH 1280
#define CAM_RES0_HEIGHT 800
#define CAM_RES1_WIDTH 640
#define CAM_RES1_HEIGHT 400
#define CAM_RES2_WIDTH 320
#define CAM_RES2_HEIGHT 200
So it looks like I need to do #define CAM_MODE2 0x03
and modify cam_setMode()
with another else
statement for that, and I need to find the proper register map to pass to cam_setRegs()
Any ideas on how to get that register map?