コンパイルすると “deprecated”(廃止された)の警告が出ていた
特にエラーではなかったので、とりあえず無視を決め込んでいたのだが、ソース清書時点で見直した
よくよく読むと、pin_sccb_~を使えと書いてある
C:/Users/xxxx/nwc-esp32s/main/main.c:94:3: warning: 'pin_sscb_sda' is deprecated: please use pin_sccb_sda instead [-Wdeprecated-declarations]
94 | config.pin_sscb_sda = SIOD_GPIO_NUM;
| ^~~~~~
In file included from C:/Users/xxxx/nwc-esp32s/main/include/cam.h:1,
from C:/Users/xxxx/nwc-esp32s/main/main.c:26:
C:/Users/xxxx/esp/v5.3.1/esp-idf/components/esp32-camera/driver/include/esp_camera.h:123:13: note: declared here
123 | int pin_sscb_sda __attribute__((deprecated("please use pin_sccb_sda instead"))); /*!< GPIO pin for camera SDA line (legacy name) */
| ^~~~~~~~~~~~
C:/Users/xxxx/nwc-esp32s/main/main.c:95:3: warning: 'pin_sscb_scl' is deprecated: please use pin_sccb_scl instead [-Wdeprecated-declarations]
95 | config.pin_sscb_scl = SIOC_GPIO_NUM;
| ^~~~~~
C:/Users/xxxx/esp/v5.3.1/esp-idf/components/esp32-camera/driver/include/esp_camera.h:127:13: note: declared here
127 | int pin_sscb_scl __attribute__((deprecated("please use pin_sccb_scl instead"))); /*!< GPIO pin for camera SCL line (legacy name) */
| ^~~~~~~~~~~~
pin_sscb_sda を pin_sccb_sda ・・・ ???
あ、あああああ!
sscb を sccb ね
というわけで、変更
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
警告は出なくなった\(^o^)/