22#ifndef MICROPY_CAMERA_MODEL_PINS_H
33#define MICROPY_CAMERA_MODEL_PINS_H
44
5+ #ifdef __cplusplus
6+ extern "C" {
7+ #endif
8+
9+ #ifndef MICROPY_CAMERA_PIN_NONE
10+ #define MICROPY_CAMERA_PIN_NONE (-1)
11+ #endif
12+
513#if defined(MICROPY_CAMERA_MODEL_WROVER_KIT )
6- #define MICROPY_CAMERA_PIN_PWDN -1
7- #define MICROPY_CAMERA_PIN_RESET -1
14+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
15+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
816#define MICROPY_CAMERA_PIN_XCLK 21
917#define MICROPY_CAMERA_PIN_SIOD 26
1018#define MICROPY_CAMERA_PIN_SIOC 27
2230#define MICROPY_CAMERA_PIN_PCLK 22
2331
2432#elif defined(MICROPY_CAMERA_MODEL_ESP_EYE )
25- #define MICROPY_CAMERA_PIN_PWDN -1
26- #define MICROPY_CAMERA_PIN_RESET -1
33+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
34+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
2735#define MICROPY_CAMERA_PIN_XCLK 4
2836#define MICROPY_CAMERA_PIN_SIOD 18
2937#define MICROPY_CAMERA_PIN_SIOC 23
4149#define MICROPY_CAMERA_PIN_PCLK 25
4250
4351#elif defined(MICROPY_CAMERA_MODEL_M5STACK_PSRAM ) || defined(MICROPY_CAMERA_MODEL_M5STACK_UNITCAM )
44- #define MICROPY_CAMERA_PIN_PWDN -1
52+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
4553#define MICROPY_CAMERA_PIN_RESET 15
4654#define MICROPY_CAMERA_PIN_XCLK 27
4755#define MICROPY_CAMERA_PIN_SIOD 25
6068#define MICROPY_CAMERA_PIN_PCLK 21
6169
6270#elif defined(MICROPY_CAMERA_MODEL_M5STACK_V2_PSRAM ) || defined(MICROPY_CAMERA_MODEL_M5STACK_WIDE )
63- #define MICROPY_CAMERA_PIN_PWDN -1
71+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
6472#define MICROPY_CAMERA_PIN_RESET 15
6573#define MICROPY_CAMERA_PIN_XCLK 27
6674#define MICROPY_CAMERA_PIN_SIOD 22
7987#define MICROPY_CAMERA_PIN_PCLK 21
8088
8189#elif defined(MICROPY_CAMERA_MODEL_M5STACK_ESP32CAM )
82- #define MICROPY_CAMERA_PIN_PWDN -1
90+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
8391#define MICROPY_CAMERA_PIN_RESET 15
8492#define MICROPY_CAMERA_PIN_XCLK 27
8593#define MICROPY_CAMERA_PIN_SIOD 25
98106#define MICROPY_CAMERA_PIN_PCLK 21
99107
100108#elif defined(MICROPY_CAMERA_MODEL_M5STACK_CAMS3_UNIT )
101- #define MICROPY_CAMERA_PIN_PWDN -1
109+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
102110#define MICROPY_CAMERA_PIN_RESET 21
103111#define MICROPY_CAMERA_PIN_XCLK 11
104112#define MICROPY_CAMERA_PIN_SIOD 17
117125#define MICROPY_CAMERA_PIN_PCLK 12
118126
119127#elif defined(MICROPY_CAMERA_MODEL_M5STACK_ATOM_S3R )
120- #define MICROPY_CAMERA_PIN_PWDN -1 //needs to be low to run
121- #define MICROPY_CAMERA_PIN_RESET -1
128+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE //needs to be low to run
129+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
122130#define MICROPY_CAMERA_PIN_XCLK 21
123131#define MICROPY_CAMERA_PIN_SIOD 12
124132#define MICROPY_CAMERA_PIN_SIOC 9
137145
138146#elif defined(MICROPY_CAMERA_MODEL_AI_THINKER )
139147#define MICROPY_CAMERA_PIN_PWDN 32
140- #define MICROPY_CAMERA_PIN_RESET -1
148+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
141149#define MICROPY_CAMERA_PIN_XCLK 0
142150#define MICROPY_CAMERA_PIN_SIOD 26
143151#define MICROPY_CAMERA_PIN_SIOC 27
155163#define MICROPY_CAMERA_PIN_PCLK 22
156164
157165#elif defined(MICROPY_CAMERA_MODEL_XIAO_ESP32S3 )
158- #define MICROPY_CAMERA_PIN_PWDN -1
159- #define MICROPY_CAMERA_PIN_RESET -1
166+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
167+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
160168#define MICROPY_CAMERA_PIN_XCLK 10
161169#define MICROPY_CAMERA_PIN_SIOD 40
162170#define MICROPY_CAMERA_PIN_SIOC 39
203211#define MICROPY_CAMERA_PIN_PCLK 25
204212
205213#elif defined(MICROPY_CAMERA_MODEL_ESP32S3_CAM_LCD )
206- #define MICROPY_CAMERA_PIN_PWDN -1
207- #define MICROPY_CAMERA_PIN_RESET -1
214+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
215+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
208216#define MICROPY_CAMERA_PIN_XCLK 40
209217#define MICROPY_CAMERA_PIN_SIOD 17
210218#define MICROPY_CAMERA_PIN_SIOC 18
222230#define MICROPY_CAMERA_PIN_PCLK 11
223231
224232#elif defined(MICROPY_CAMERA_MODEL_ESP32S3_EYE ) || defined(MICROPY_CAMERA_MODEL_FREENOVE_ESP32S3_CAM )
225- #define MICROPY_CAMERA_PIN_PWDN -1
226- #define MICROPY_CAMERA_PIN_RESET -1
233+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
234+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
227235#define MICROPY_CAMERA_PIN_XCLK 15
228236#define MICROPY_CAMERA_PIN_SIOD 4
229237#define MICROPY_CAMERA_PIN_SIOC 5
241249#define MICROPY_CAMERA_PIN_PCLK 13
242250
243251#elif defined(MICROPY_CAMERA_MODEL_DFRobot_ESP32S3 )
244- #define MICROPY_CAMERA_PIN_PWDN -1
245- #define MICROPY_CAMERA_PIN_RESET -1
252+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
253+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
246254#define MICROPY_CAMERA_PIN_XCLK 45
247255#define MICROPY_CAMERA_PIN_SIOD 1
248256#define MICROPY_CAMERA_PIN_SIOC 2
279287#define MICROPY_CAMERA_PIN_PCLK 21
280288
281289#elif defined(MICROPY_CAMERA_MODEL_TTGO_T_CAMERA_PLUS )
282- #define MICROPY_CAMERA_PIN_PWDN -1
283- #define MICROPY_CAMERA_PIN_RESET -1
290+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
291+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
284292#define MICROPY_CAMERA_PIN_XCLK 4
285293#define MICROPY_CAMERA_PIN_SIOD 18
286294#define MICROPY_CAMERA_PIN_SIOC 23
299307
300308#elif defined(MICROPY_CAMERA_MODEL_NEW_ESPS3_RE1_0 )
301309// aliexpress board with label RE:1.0, uses slow 8MB QSPI PSRAM, only 4MB addressable
302- #define MICROPY_CAMERA_PIN_PWDN -1
303- #define MICROPY_CAMERA_PIN_RESET -1
310+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
311+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
304312#define MICROPY_CAMERA_PIN_XCLK 10
305313#define MICROPY_CAMERA_PIN_SIOD 21
306314#define MICROPY_CAMERA_PIN_SIOC 14
318326#define MICROPY_CAMERA_PIN_PCLK 7
319327
320328#elif defined(MICROPY_CAMERA_MODEL_XENOIONEX )
321- #define MICROPY_CAMERA_PIN_PWDN -1
322- #define MICROPY_CAMERA_PIN_RESET -1
329+ #define MICROPY_CAMERA_PIN_PWDN MICROPY_CAMERA_PIN_NONE
330+ #define MICROPY_CAMERA_PIN_RESET MICROPY_CAMERA_PIN_NONE
323331#define MICROPY_CAMERA_PIN_XCLK 1 // Can use
324- #define MICROPY_CAMERA_PIN_SIOD 8 // Can use other i2c SDA pin, set this to -1 | If not using i2c set to 8 or 47
325- #define MICROPY_CAMERA_PIN_SIOC 9 // Can use other i2c SCL pin, set this to -1 | If not using i2c set to 9 or 21
332+ #define MICROPY_CAMERA_PIN_SIOD 8 // Can use other i2c SDA pin, set this to MICROPY_CAMERA_PIN_NONE | If not using i2c set to 8 or 47
333+ #define MICROPY_CAMERA_PIN_SIOC 9 // Can use other i2c SCL pin, set this to MICROPY_CAMERA_PIN_NONE | If not using i2c set to 9 or 21
326334
327335#define MICROPY_CAMERA_PIN_D7 3 //D7
328336#define MICROPY_CAMERA_PIN_D6 18 //D6
337345#define MICROPY_CAMERA_PIN_PCLK 2
338346
339347#endif // definition of camera pins for different boards
348+
349+ #ifdef __cplusplus
350+ }
351+ #endif
352+
340353#endif // MICROPY_CAMERA_MODEL_PINS_H
0 commit comments