Hi,
I'm 99% of the way in freeing my project from arduino IDE. I have one error I can't resolve.
I have an include file which is pulled in at the first line of my file defining main(). This starts with:
Indeed it appears not to be defined.
Can anyone see where I'm messing up ? TIA.
I'm 99% of the way in freeing my project from arduino IDE. I have one error I can't resolve.
Code:
error: 'I2C_NUM' was not declared in this scope 1038 | DEBUG_PRINTF("# USE_PICO: %d setup: gp%d,gp%d on core_%d \n",I2C_NUM(i2c_bus),SDA_PIN,SCL_PIN,get_core_num ());
Code:
#include <stdint.h> #include <cstring> // memset ? #define USE_PICO true #if (USE_PICO) #define USE_SDK true #if (USE_SDK) typedef uint64_ttimestamp_t ; #define delay(x) sleep_ms(x) #define micros() time_us_64() #include "hardware/i2c.h" // find I2C_NUM ? #include <pico/stdlib.h> #include <pico/printf.h> #include <pico/float.h> // #include <pico/stdio_uart.h> // "stdio_uart_init is not supported or needed.": pulling in RP2040 philhowler. // #include <pico/divider.h> // should be in pico/stdlib ; arduino build can't find : pulling in RP2040 philhowler. // #include <pico/malloc.h> // included by pico/stdlib #include "hardware/timer.h" // timestamp fns #include "hardware/pwm.h" // for servos #include "hardware/clocks.h" // sdk 2.0 , moved get_clk_hz() et al #include "hardware/structs/clocks.h" // why? sys_clk?
Code:
cd $PICO_SDK_PATH grep -iRn "I2C_NUM" *lib/btstack/port/esp32/components/btstack/es8388.h:230: .i2c_port_num = I2C_NUM_0, \
Can anyone see where I'm messing up ? TIA.
Statistics: Posted by pie_face — Tue Nov 26, 2024 9:30 am — Replies 5 — Views 81