lewisxhe / AXP202X_Library

Arduino & ESP-IDF libraries written for AXP19x, 20x
MIT License
91 stars 40 forks source link

Compile error when using ESP-IDF #40

Closed mr-goldhands closed 3 years ago

mr-goldhands commented 3 years ago

I am trying to use this library to build ESP-IDF version sources for TTGO Watch 2020 v1. I obtained the compilation error:

../components/AXP202X/src/axp20x.cpp: In member function 'int AXP20X_Class::_writeByte(uint8_t, uint8_t, uint8_t*)':
../components/AXP202X/src/axp20x.cpp:2251:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

It is because of conditional compilation. When I fix it in my local repo it seems to work well.

My ESP-IDF version is : ESP-IDF v4.4-dev-4-g73db14240