Open chriscamacho opened 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));
data = __builtin_bswap16(data); return err; }
static esp_err_t spi_write16(uint16_t 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) {
}
/ Read data / @@ -120,7 +122,8 @@ esp_err_t i2c_write(uint8_t dev_addr, uint16_t reg_addr, i2c_reg_addr_size_t reg
/ Fix endianness if register address if 2-byte / if (reg_addr_size == I2C_REG_ADDR_SIZE_WORD) {
reg_addr = __builtin_bswap16(reg_addr); }
/ Write data / diff --git a/dependencies.lock b/dependencies.lock index 77e9fef..3f29200 100644 --- a/dependencies.lock +++ b/dependencies.lock @@ -3,7 +3,7 @@ dependencies: component_hash: null source: type: idf
I'm guessing newer version of GCC ? and maybe ide ?
/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