The old code always wrote BRIGHT even if enabling ISPCTRL5 failed,
while also overwriting the first error code. It also used
`if (ret != 0)` to log/update status, so we reported success when
the write actually failed.
Guard the BRIGHT write behind a successful ISPCTRL5 write and only log /
update `sensor->status.brightness` when both writes succeed. This keeps
the original error, and prevents false success reports.
* Mark all currently unused PLL parameters with (void) to remove
-Wunused-parameter noise.
* After a successful read_reg(), reject any value > 0xFF and return
-ERANGE. Ensures only 8-bit data is written to PLL1CFG.
The old code stored the raw return value of read_reg() in an 8-bit
variable and wrote it straight back to PLL1CFG. A negative I²C/SCCB
error therefore became 0xFF (or similar), silently corrupting the
sensor’s clock tree while still returning “success”.
* Read PLL1CFG into an int (`ret`) and return immediately if `ret < 0`.
* Cast to uint8_t only after the error check, then proceed with the
masked write.
This propagates read failures to the caller and guarantees we never
write garbage to the PLL register under fault conditions.
```txt
espressif__esp32-camera/sensors/private_include/sc031gs.h:6: error: header guard '__SC031GS_H__' followed by '#define' of a different macro [-Werror=header-guard]
6 | #ifndef __SC031GS_H__
espressif__esp32-camera/sensors/private_include/sc031gs.h:7: note: '__SC030GS_H__' is defined here; did you mean '__SC031GS_H__'?
7 | #define __SC030GS_H__
```
- update sensor->status.contrast when setting contrast (consistent with most other settings like hmirror)
- initialize sensor->status.contrast to the actual default (50) rather than 0, which is invalid
* ov7670: fix ov7670_frame_control()
Last value of array (VREF) was overwritten by end marker
* OV7670: Adapt QQVGA VSTART value to remove bar on top
Remove empty bar at the top of the frame. This is more visible on
OV7675, but also present on OV7670
BF3005 is a VGA CMOS Image Sensor.
The sensor is well stocked and comes with a series of image processing functions.
The support for this sensor is added here to facilitate the use of this sensor by more people. PTAL,Thanks.
When I use OV7725 and OV7670, I can't get the image. This pr modifies the VSYNC register of OV7725 7670, and the image can be obtained normally, and the white balance is adjusted to make the obtained image normal.
- Add sensor GC2145 GC0308 GC032A
- Make xclk driver more standard
- Update README.md
- Add an option to adjust the DMA buffer size
Co-authored-by: zhouli <zhouli@espressif.com>
This PR fixes some warnings about the nt99141 sensor's driver implementation so we can build it with -Werror:
actually return the ret variable in set_framesize
remove unused variables in set_brightness and set_contrast
remove unused function calc_sysclk