Created
January 16, 2020 14:20
-
-
Save thibthibaut/ed922886c1f8001245cf1269d84e8b9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief Enable or disable mirror mode for camera | |
* @param boolean value, 0 disable, other enable | |
* @retval void | |
*/ | |
void BSP_CAMERA_Mirror(int enable){ | |
const uint8_t MVFP_REG = 0x1E; | |
uint8_t reg_val = CAMERA_IO_Read(CameraHwAddress, MVFP_REG); | |
if(enable){ | |
CAMERA_IO_Write(CameraHwAddress, MVFP_REG, reg_val | 0x20 ); | |
} else { | |
CAMERA_IO_Write(CameraHwAddress, MVFP_REG, reg_val & (0xDF) ); | |
} | |
} | |
/** | |
* @brief Enable or disable vflip mode for camera | |
* @param boolean value, 0 disable, other enable | |
* @retval void | |
*/ | |
void BSP_CAMERA_VFlip(int enable){ | |
const uint8_t MVFP_REG = 0x1E; | |
uint8_t reg_val = CAMERA_IO_Read(CameraHwAddress, MVFP_REG); | |
if(enable){ | |
CAMERA_IO_Write(CameraHwAddress, MVFP_REG, reg_val | 0x30); | |
} else { | |
CAMERA_IO_Write(CameraHwAddress, MVFP_REG, reg_val & (0xEF)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment