Lefucjusz / M5Paper-ePub-reader

M5Paper-based e-book reader supporting ePub format, with GUI created using LVGL. Currently rather a PoC than a fully usable piece of software.
GNU General Public License v3.0
4 stars 0 forks source link

compile error #2

Open chriscamacho opened 1 month ago

chriscamacho commented 1 month ago

/home/chris/development/m5paper/M5Paper-ePub-reader/components/bsp/eink/eink.c: In function 'spi_read16': /home/chris/development/m5paper/M5Paper-ePub-reader/components/bsp/eink/eink.c:379:13: error: implicit declaration of function '__bswap16' [-Werror=implicit-function-declaration] 379 | *data = __bswap16(*data); // ESP32 is little endian, IT8951 big endian | ^~~~~~~~~ cc1: some warnings being treated as errors

now its been a few years since I last used the IDF, I ran ./install.sh esp32 after pulling the idf repo (and sub modules!)

then after sourcing the export script, from the root of this repo ran idf.py build

chriscamacho commented 1 month ago

got chance to have a look at this better

`diff --git a/components/bsp/eink/eink.c b/components/bsp/eink/eink.c index 00442b5..6a8d5b3 100644 --- a/components/bsp/eink/eink.c +++ b/components/bsp/eink/eink.c @@ -376,13 +376,15 @@ static esp_err_t spi_transfer(const void tx_buffer, void rx_buffer, size_t siz static esp_err_t spi_read16(uint16_t data) { const esp_err_t err = spi_transfer(NULL, data, sizeof(data));

diff --git a/components/bsp/i2c/i2c.c b/components/bsp/i2c/i2c.c index 84bb59e..e785466 100644 --- a/components/bsp/i2c/i2c.c +++ b/components/bsp/i2c/i2c.c @@ -47,7 +47,9 @@ esp_err_t i2c_read(uint8_t dev_addr, uint16_t reg_addr, i2c_reg_addr_sizet reg

 /* Fix endianness if register address size is word */
 if (reg_addr_size == I2C_REG_ADDR_SIZE_WORD) {

I'm guessing newer version of GCC ? and maybe ide ?