最近在驱动OV7725时代码上遇到了一个问题
typedef struct
{
uint8_t QVGA_VGA; /*0:QVGA 1:VGA*/
/*QVGA:sx + width <=320, sy + heigth <=240*/
/*VGA:sx + width <=320 或 240, sy + heigth <=320 或 240*/
uint16_t cam_sx; /*摄像头窗口X起始位置*/
uint16_t cam_sy; /*摄像头窗口Y起始位置*/
uint16_t cam_width;/*图像分辨率,宽*/
uint16_t cam_height;/*图像分辨率,高*/
uint16_t lcd_sx;/*图像显示在液晶屏的X起始位置*/
uint16_t lcd_sy;/*图像显示在液晶屏的Y起始位置*/
uint8_t lcd_scan;/*液晶屏的扫描模式(0-7)*/
uint8_t light_mode;/*光照模式,参考范围[0~5]*/
int8_t saturation;/*饱和度,参考范围[-4~+4]*/
int8_t brightness;/*光照度,参考范围[-4~+4]*/
int8_t contrast;/*对比度,参考范围[-4~+4]*/
uint8_t effect;/*特殊模式,参考范围[0~6]*/
}OV7725_MODE_PARAM;
我该如何对其里面的值赋值
OV7725_MODE_PARAM cam_mode =
{
.QVGA_VGA = 0,
.cam_sx = 0,
.cam_sy = 0,
.cam_width = 320,
.cam_height = 240,
.lcd_sx = 0,
.lcd_sy = 0,
.lcd_scan = 3,
.light_mode = 0,
.saturation = 0,
.brightness = 0,
.contrast = 0,
.effect = 0,
};
我参考STM32的例程对其赋值,但是系统报错#29 expected an expression,想问下大家有什么解决方法? |