@@ -123,8 +123,8 @@ static camera_config_t *create_camera_config(framesize_t frame_size, int jpeg_qu
123
123
config -> pin_pwdn = AI_THINKER_CAM_PIN_PWDN ;
124
124
config -> pin_reset = AI_THINKER_CAM_PIN_RESET ;
125
125
config -> pin_xclk = AI_THINKER_CAM_PIN_XCLK ;
126
- config -> pin_sscb_sda = AI_THINKER_CAM_PIN_SIOD ;
127
- config -> pin_sscb_scl = AI_THINKER_CAM_PIN_SIOC ;
126
+ config -> pin_sccb_sda = AI_THINKER_CAM_PIN_SIOD ;
127
+ config -> pin_sccb_scl = AI_THINKER_CAM_PIN_SIOC ;
128
128
config -> pin_d7 = AI_THINKER_CAM_PIN_D7 ;
129
129
config -> pin_d6 = AI_THINKER_CAM_PIN_D6 ;
130
130
config -> pin_d5 = AI_THINKER_CAM_PIN_D5 ;
@@ -223,7 +223,7 @@ static term nif_esp32cam_capture(Context *ctx, int argc, term argv[])
223
223
ESP_LOGE (TAG , "Image memory allocation (%i) failed" , fb -> len );
224
224
RAISE_ERROR (MEMORY_ATOM );
225
225
}
226
- term image = term_from_literal_binary ((const char * )fb -> buf , fb -> len , ctx );
226
+ term image = term_from_literal_binary ((const char * )fb -> buf , fb -> len , & ctx -> heap , ctx -> global );
227
227
esp_camera_fb_return (fb );
228
228
229
229
return port_create_tuple2 (ctx , OK_ATOM , image );
@@ -271,5 +271,5 @@ const struct Nif *atomvm_esp32cam_get_nif(const char *nifname)
271
271
272
272
#include <sdkconfig.h>
273
273
#ifdef CONFIG_AVM_ESP32CAM_ENABLE
274
- REGISTER_NIF_COLLECTION (atomvm_esp32cam , atomvm_esp32cam_init , atomvm_esp32cam_get_nif )
274
+ REGISTER_NIF_COLLECTION (atomvm_esp32cam , atomvm_esp32cam_init , NULL , atomvm_esp32cam_get_nif )
275
275
#endif
0 commit comments