Closed jepler closed 3 years ago
When integrating this code with CircuitPython, I encountered build errors due to diagnostics that are enabled by default in our build system:
../../lib/protomatter/src/core.c: In function '_PM_init': ../../lib/protomatter/src/core.c:117:32: error: implicit declaration of function 'abs' [-Werror=implicit-function-declaration] 117 | core->chainBits = bitWidth * abs(tile); // Total matrix chain bits | ^~~ ../../lib/protomatter/src/core.c: In function '_PM_convert_565_byte': ../../lib/protomatter/src/core.c:937:7: error: declaration of non-variable 'abs' in 'for' loop initial declaration 937 | for (int8_t tile = abs(core->tile) - 1; tile >= 0; tile--) { | ^~~ ../../lib/protomatter/src/core.c:943:31: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 943 | uint16_t *srcTileUL = source + tile * width * core->numRowPairs * 2; | ^~~~~~
.. these changes fix the build errors and are needed before we can integrate tiling in CircuitPython.
When integrating this code with CircuitPython, I encountered build errors due to diagnostics that are enabled by default in our build system:
.. these changes fix the build errors and are needed before we can integrate tiling in CircuitPython.