Skip to content

Commit ca09cc4

Browse files
committed
Add support for HM0360
1 parent 23deb29 commit ca09cc4

File tree

10 files changed

+1052
-1
lines changed

10 files changed

+1052
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST
4242
sensors/sc030iot.c
4343
sensors/sc031gs.c
4444
sensors/hm1055.c
45+
sensors/hm0360.c
4546
)
4647

4748
list(APPEND priv_include_dirs

Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ menu "Camera configuration"
123123
help
124124
Enable this option if you want to use the HM1055.
125125
Disable this option to save memory.
126+
127+
config HM0360_SUPPORT
128+
bool "Support HM0360 VGA"
129+
default y
130+
help
131+
Enable this option if you want to use the HM0360.
132+
Disable this option to save memory.
126133

127134
config SCCB_I2C_PORT
128135

driver/esp_camera.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
#if CONFIG_HM1055_SUPPORT
7373
#include "hm1055.h"
7474
#endif
75+
#if CONFIG_HM0360_SUPPORT
76+
#include "hm0360.h"
77+
#endif
7578

7679
#if defined(ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
7780
#include "esp32-hal-log.h"
@@ -149,6 +152,9 @@ static const sensor_func_t g_sensors[] = {
149152
#if CONFIG_HM1055_SUPPORT
150153
{hm1055_detect, hm1055_init},
151154
#endif
155+
#if CONFIG_HM0360_SUPPORT
156+
{hm0360_detect, hm0360_init},
157+
#endif
152158
};
153159

154160
static esp_err_t camera_probe(const camera_config_t *config, camera_model_t *out_camera_model)

driver/include/sensor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ typedef enum {
3232
SC030IOT_PID = 0x9a46,
3333
SC031GS_PID = 0x0031,
3434
HM1055_PID = 0x0955,
35+
HM0360_PID = 0x0360
3536
} camera_pid_t;
3637

3738
typedef enum {
@@ -50,6 +51,7 @@ typedef enum {
5051
CAMERA_SC030IOT,
5152
CAMERA_SC031GS,
5253
CAMERA_HM1055,
54+
CAMERA_HM0360,
5355
CAMERA_MODEL_MAX,
5456
CAMERA_NONE,
5557
} camera_model_t;
@@ -70,6 +72,7 @@ typedef enum {
7072
SC030IOT_SCCB_ADDR = 0x68,// 0xd0 >> 1
7173
SC031GS_SCCB_ADDR = 0x30,
7274
HM1055_SCCB_ADDR = 0x24,
75+
HM0360_SCCB_ADDR = 0x12,
7376
} camera_sccb_addr_t;
7477

7578
typedef enum {
@@ -82,6 +85,7 @@ typedef enum {
8285
PIXFORMAT_RAW, // RAW
8386
PIXFORMAT_RGB444, // 3BP2P/RGB444
8487
PIXFORMAT_RGB555, // 3BP2P/RGB555
88+
PIXFORMAT_RAW8, // RAW 8-bit
8589
} pixformat_t;
8690

8791
typedef enum {

driver/sensor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const camera_sensor_info_t camera_sensor[CAMERA_MODEL_MAX] = {
1818
{CAMERA_SC030IOT, "SC030IOT", SC030IOT_SCCB_ADDR, SC030IOT_PID, FRAMESIZE_VGA, false},
1919
{CAMERA_SC031GS, "SC031GS", SC031GS_SCCB_ADDR, SC031GS_PID, FRAMESIZE_VGA, false},
2020
{CAMERA_HM1055, "HM1055", HM1055_SCCB_ADDR, HM1055_PID, FRAMESIZE_HD, false},
21+
{CAMERA_HM0360, "HM0360", HM0360_SCCB_ADDR, HM0360_PID, FRAMESIZE_VGA, false},
2122
};
2223

2324
const resolution_info_t resolution[FRAMESIZE_INVALID] = {

0 commit comments

Comments
 (0)