Stupid enum problem....
Posted: Mon Apr 22, 2019 5:59 pm
Ok, maybe I'm being dense but this statement:
enum command_id:uint8_t {BMI160TELEMETRY = 1, MPU9250TELEMETRY};
Compiles ok in ESP32 arduino but fails when I compile it under ESP-IDF with the following error
C:/msys32/home/gcorson/esp/tcp_server/main/tcp_server.c:31:16: error: expected identifier or '(' before ':' token enum command_id:uint8_t {BMI160TELEMETRY = 1, MPU9250TELEMETRY};
Not clear why this happens, isn't enum's syntax supposed to be
enum [identifier] [: type] {enum-list};
What am I doing wrong?
enum command_id:uint8_t {BMI160TELEMETRY = 1, MPU9250TELEMETRY};
Compiles ok in ESP32 arduino but fails when I compile it under ESP-IDF with the following error
C:/msys32/home/gcorson/esp/tcp_server/main/tcp_server.c:31:16: error: expected identifier or '(' before ':' token enum command_id:uint8_t {BMI160TELEMETRY = 1, MPU9250TELEMETRY};
Not clear why this happens, isn't enum's syntax supposed to be
enum [identifier] [: type] {enum-list};
What am I doing wrong?