66 Commits

Author SHA1 Message Date
7ffdae8c47 hm1055: fix set_brightness error handling & logging
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.
2025-07-17 07:39:51 +02:00
c12517e467 hm0360: _set_pll(): guard against wide reads and silence unused-param warnings
* 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.
2025-07-15 06:34:13 +02:00
be37adc2da hm0360: _set_pll(): detect read_reg failure before writing 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.
2025-07-15 06:26:40 +02:00
5fe2266536 Merge pull request #707 from Lesords/feat/hm1055
feat: add camera drivers for hm0360 and hm1055
2025-07-01 10:35:10 +03:00
64e8b613e2 fix: fix some compilation errors 2025-07-01 10:33:46 +08:00
9a7ee2450e Merge branch 'master' into feat/hm1055 2025-06-30 19:23:19 +03:00
6e46f808a5 Merge branch 'master' into patch-1 2025-06-30 19:18:09 +03:00
b6a43ef960 fix build error
```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__
```
2025-06-29 14:31:19 +08:00
80747678ab contrast fixes
- 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
2025-04-17 17:44:36 -07:00
cf09e5a5d6 style: update code format 2025-02-08 06:11:20 +00:00
7fad3cdf9b perf: improve some interface functions of hm0360 camera and discarded useless interfaces 2025-02-08 06:11:19 +00:00
588eeff2cc Add support for HM0360 2025-02-08 06:11:19 +00:00
8aad5f7890 Add support for HM1055 2025-02-08 06:11:11 +00:00
b6a8297342 Add mega ccm driver support
Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
2024-11-15 12:39:16 +08:00
dba8da9898 Fix right column & row of the measure window (#588)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-11-10 12:35:17 +02:00
81cd88c6a0 fix: add gc0308 output only Y format support (#589) 2023-11-08 15:44:40 +02:00
efe711df9a fix: add SC031GS VGA framesize support (#581) 2023-10-11 18:55:58 +03:00
d1c9c2cdb3 feat: add bf20a6 output Only Y format support (#557) 2023-08-08 12:01:58 +03:00
8bcc835cf7 OV7670 fixes (#484)
* 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
2022-12-08 15:18:34 +02:00
9d9e7d62a3 feat: add SC031GS camera sensor support 2022-09-26 16:33:43 +08:00
8575d75b91 fix: fix ov5640 sys reset to MCU mode reset (#407) 2022-06-30 15:15:43 +03:00
97d2c297f0 fix: fix gc0308 REGLIST_TAIL define error (#408) 2022-06-30 15:14:55 +03:00
eee63849f4 feat: add sc101iot camera sensor driver (#412) 2022-06-30 15:14:35 +03:00
157fadb75c feat: add camera sensor sc030iot support 2022-05-25 11:17:20 +08:00
efa435362c feat: add camera sensor BF20A6 support (#365) 2022-02-20 15:08:54 +02:00
49edbbfac0 feat: add camera sensor bf3005 support (#350)
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.
2022-01-18 16:43:42 +02:00
82160bca23 Silence unused variable warnings (#340) 2022-01-18 16:39:32 +02:00
221d24da19 bugfix:ov7725 vsync get frame failed (#335)
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.
2021-12-23 12:12:12 +02:00
6a9497bbe9 Update ov2640.c (#298)
offset_Y was repeated, the last change to offset_X
2021-07-20 11:08:07 +03:00
6b1efc1edd add gcxxxx sensors (#293)
- 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>
2021-07-15 17:17:15 +03:00
5a5efde083 Fix nt99141 sensor (#188)
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
2021-06-18 11:54:05 +03:00
7a06a7e362 Experimental: Enable EDMA for JPEG when XCLK is 16MHz 2021-05-31 18:05:53 +03:00
7da9cb5ea3 Adjust clocks and DMA for non-jpeg modes and enable EDMA only for 16MHz XCLK 2021-05-27 22:43:00 +03:00
b58018357a Initial support for ESP32-S3 2021-05-14 13:57:24 +03:00
acf206a62a Add initial ESP32-S2 support 2021-04-30 16:51:03 +03:00
466325cad8 Merge branch 'Camera/NT99141' of https://github.com/ChenZhengwei20190741/esp32-camera into Camera/NT99141 2020-10-16 17:08:24 +08:00
185f285290 bugfix(NT99141):
1. fix the JPEG exception bug
    2. add new feature such as AE level ...
2020-10-16 16:57:52 +08:00
48a83ed97b Merge branch 'master' into Camera/NT99141 2020-10-14 02:10:27 +03:00
31d37804c6 rebase espressif/esp32-camera and idf v4.3-dev-1197-g8bc19ba89-dirty
Update sensor code OV7670 to esp32_camera from 10/13/2020 and compile it with idf v4.3-dev-1197-g8bc19ba89-dirty
2020-10-13 13:44:13 -03:00
782b3df10b Camera(NT99141): add a new Camera 2020-09-17 14:46:48 +08:00
024d66f929 Update ov7725.c 2020-06-04 14:52:53 +03:00
af931850f4 Some 7725 fixes 2020-06-03 22:54:57 +03:00
be6dfe7eee add OV5640 driver 2020-03-13 23:41:23 -03:00
fb6c27a056 try rebase 2020-03-13 14:26:51 -03:00
ae32d52cc2 initial 5640 support 2020-03-12 00:42:57 +02:00
d1035151dd fix set_hmirror of ov7670 2020-03-11 15:18:15 -03:00
31e9904c67 Revert "add OV5640 driver"
This reverts commit df03701ff7967fac8c4d23454bf1cd6300dca626.
2020-03-11 13:48:35 -03:00
a9b5108786 Revert "add OV5640 driver"
This reverts commit 6aece9ff2282b67a4f61d1f322f39c797e274e6c.
2020-03-11 13:43:35 -03:00
b630935ffd Revert "fix set_hmirror of ov7670"
This reverts commit 6cf982810692ab7671da390f0016a66c2b6fec69.
2020-03-11 13:33:38 -03:00
6cf9828106 fix set_hmirror of ov7670 2020-03-08 21:07:10 -03:00