![]() ![]() The i2c_hal.h and i2c_hal.c implementation has a lot of uint8_t typed length and index variables. Is there any way I can increase the buffer size to 258 bytes? I think this is because the quantity variable is a uint8 and therefore cannot store 258. If I reduce the buffer size to 255 the make command compiles successfully. Make: Leaving directory `/home/joe/git/firmware/hal' Src/stm32f2xx/i2c_hal.c:268:20: note: in expansion of macro 'BUFFER_LENGTH'Ĭc1: all warnings being treated as errors #define BUFFER_LENGTH (I2C_BUFFER_LENGTH) Src/stm32f2xx/i2c_hal.c:38:25: error: large integer implicitly truncated to unsigned type src/stm32f2xx/i2c_hal.c: In function 'HAL_I2C_Request_Data': I now get a compile error when I run make clean all PLATFORM=photon from the root firmware directory. ![]() I have changed them from #define I2C_BUFFER_LENGTH 32 to #define I2C_BUFFER_LENGTH 258. The I2C max buffer size is 32 bytes which I have tried to increase to 258 bytes by modifying both I2C_BUFFER_LENGTH defines in i2c_hal.h. I need to communicate with an I2C device that requires me to read the data out in one 258 byte request. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |