We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
arduino
Learn more about funding links in repositories.
Report abuse
2 parents f2af60a + 43c0573 commit 5af0bd7Copy full SHA for 5af0bd7
libraries/OV7670/ov7670.cpp
@@ -699,12 +699,16 @@ int OV7670::setFrameRate(int32_t framerate)
699
700
int OV7670::setVerticalFlip(bool flip_enable)
701
{
702
- return -1;
+ uint8_t currentRegisterValue = regRead(getID(), MVFP);
703
+ uint8_t newRegisterValue = flip_enable ? currentRegisterValue | MVFP_VFLIP : currentRegisterValue & ~MVFP_VFLIP;
704
+ return regWrite(getID(), MVFP, newRegisterValue);
705
}
706
707
int OV7670::setHorizontalMirror(bool mirror_enable)
708
709
710
+ uint8_t newRegisterValue = mirror_enable ? currentRegisterValue | MVFP_MIRROR : currentRegisterValue & ~MVFP_MIRROR;
711
712
713
714
int OV7670::setResolution(int32_t resolution)
0 commit comments