drivers/video/isx019: Fix bug that initial exposure time is not correct

Because exposure time calculation needs the cxd56xx clock value,
get the cxd56xx clock value before saving initial value.
This commit is contained in:
SPRESENSE 2023-12-21 13:40:57 +09:00 committed by Alin Jerpelea
parent 76e91a69f7
commit 33f7923d72

View File

@ -1354,9 +1354,14 @@ static int isx019_init(FAR struct imgsensor_s *sensor)
fpga_init(priv);
initialize_wbmode(priv);
initialize_jpg_quality(priv);
store_default_value(priv);
/* Because store_default_value() needs the clock ratio,
* clock_ratio has to be calculated first.
*/
clk = board_isx019_get_master_clock();
priv->clock_ratio = (float)clk / ISX019_STANDARD_MASTER_CLOCK;
store_default_value(priv);
return OK;
}