Code: Select all
Arduino: 1.8.12 (Windows 10), Board: "WiFi LoRa 32(V2), Disabled, 240MHz (WiFi/BT), 921600, None, REGION_EU868, None"
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino: In function 'void task_mpu6050(void*)':
ESP32_Accel_SNIPPET:43:18: error: invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
conf.sda_io_num = PIN_SDA;
^
ESP32_Accel_SNIPPET:44:18: error: invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
conf.scl_io_num = PIN_CLK;
^
ESP32_Accel_SNIPPET:93:54: error: invalid conversion from 'int' to 'i2c_ack_type_t' [-fpermissive]
ESP_ERROR_CHECK(i2c_master_read_byte(cmd, data, 0));
^
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:37:51: note: in definition of macro 'ESP_ERROR_CHECK'
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
^
In file included from C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:1:0:
C:\Users\Tony\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.5/tools/sdk/include/driver/driver/i2c.h:306:11: note: initializing argument 3 of 'esp_err_t i2c_master_read_byte(i2c_cmd_handle_t, uint8_t*, i2c_ack_type_t)'
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
^
ESP32_Accel_SNIPPET:94:54: error: invalid conversion from 'int' to 'i2c_ack_type_t' [-fpermissive]
ESP_ERROR_CHECK(i2c_master_read_byte(cmd, data+1, 0));
^
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:37:51: note: in definition of macro 'ESP_ERROR_CHECK'
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
^
In file included from C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:1:0:
C:\Users\Tony\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.5/tools/sdk/include/driver/driver/i2c.h:306:11: note: initializing argument 3 of 'esp_err_t i2c_master_read_byte(i2c_cmd_handle_t, uint8_t*, i2c_ack_type_t)'
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
^
ESP32_Accel_SNIPPET:95:54: error: invalid conversion from 'int' to 'i2c_ack_type_t' [-fpermissive]
ESP_ERROR_CHECK(i2c_master_read_byte(cmd, data+2, 0));
^
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:37:51: note: in definition of macro 'ESP_ERROR_CHECK'
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
^
In file included from C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:1:0:
C:\Users\Tony\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.5/tools/sdk/include/driver/driver/i2c.h:306:11: note: initializing argument 3 of 'esp_err_t i2c_master_read_byte(i2c_cmd_handle_t, uint8_t*, i2c_ack_type_t)'
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
^
ESP32_Accel_SNIPPET:96:54: error: invalid conversion from 'int' to 'i2c_ack_type_t' [-fpermissive]
ESP_ERROR_CHECK(i2c_master_read_byte(cmd, data+3, 0));
^
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:37:51: note: in definition of macro 'ESP_ERROR_CHECK'
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
^
In file included from C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:1:0:
C:\Users\Tony\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.5/tools/sdk/include/driver/driver/i2c.h:306:11: note: initializing argument 3 of 'esp_err_t i2c_master_read_byte(i2c_cmd_handle_t, uint8_t*, i2c_ack_type_t)'
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
^
ESP32_Accel_SNIPPET:97:54: error: invalid conversion from 'int' to 'i2c_ack_type_t' [-fpermissive]
ESP_ERROR_CHECK(i2c_master_read_byte(cmd, data+4, 0));
^
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:37:51: note: in definition of macro 'ESP_ERROR_CHECK'
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
^
In file included from C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:1:0:
C:\Users\Tony\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.5/tools/sdk/include/driver/driver/i2c.h:306:11: note: initializing argument 3 of 'esp_err_t i2c_master_read_byte(i2c_cmd_handle_t, uint8_t*, i2c_ack_type_t)'
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
^
ESP32_Accel_SNIPPET:98:54: error: invalid conversion from 'int' to 'i2c_ack_type_t' [-fpermissive]
ESP_ERROR_CHECK(i2c_master_read_byte(cmd, data+5, 1));
^
C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:37:51: note: in definition of macro 'ESP_ERROR_CHECK'
#define ESP_ERROR_CHECK(x) do { esp_err_t rc = (x); if (rc != ESP_OK) { ESP_LOGE("err", "esp_err_t = %d", rc); assert(0 && #x);} } while(0);
^
In file included from C:\Users\Tony\Desktop\ESP32_Accel_SNIPPET\ESP32_Accel_SNIPPET.ino:1:0:
C:\Users\Tony\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.5/tools/sdk/include/driver/driver/i2c.h:306:11: note: initializing argument 3 of 'esp_err_t i2c_master_read_byte(i2c_cmd_handle_t, uint8_t*, i2c_ack_type_t)'
esp_err_t i2c_master_read_byte(i2c_cmd_handle_t cmd_handle, uint8_t* data, i2c_ack_type_t ack);
^
exit status 1
invalid conversion from 'int' to 'gpio_num_t' [-fpermissive]
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.