Open dewhisna opened 1 year ago
Memory usage change @ 92efe52ec9feb3195649bca4e6ae593c3078b196
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
arduino:avr:LilyPadUSB | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:atmegang:cpu=atmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:atmegang:cpu=atmega8 | :grey_question: -12 - +36 | -0.17 - +0.5 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:bt:cpu=atmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:bt:cpu=atmega328 | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:chiwawa | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:circuitplay32u4cat | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | N/A |
arduino:avr:diecimila:cpu=atmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:diecimila:cpu=atmega328 | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:esplora | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:ethernet | :grey_question: -12 - +36 | -0.04 - +0.11 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:fio | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:gemma | 0 - 0 | 0.0 - 0.0 | 0 - 0 | N/A |
arduino:avr:leonardo | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:leonardoeth | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:lilypad:cpu=atmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:lilypad:cpu=atmega328 | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:mega:cpu=atmega1280 | :grey_question: -12 - +40 | -0.01 - +0.03 | :green_heart: -32 - 0 | -0.39 - 0.0 |
arduino:avr:mega:cpu=atmega2560 | :grey_question: -12 - +40 | -0.0 - +0.02 | :green_heart: -32 - 0 | -0.39 - 0.0 |
arduino:avr:megaADK | :grey_question: -12 - +40 | -0.0 - +0.02 | :green_heart: -32 - 0 | -0.39 - 0.0 |
arduino:avr:micro | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:mini:cpu=atmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:mini:cpu=atmega328 | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:nano:cpu=atmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:nano:cpu=atmega328 | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:nano:cpu=atmega328old | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:one | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:pro:cpu=16MHzatmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:pro:cpu=16MHzatmega328 | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:pro:cpu=8MHzatmega168 | :grey_question: -12 - +36 | -0.08 - +0.25 | :green_heart: -32 - 0 | -3.12 - 0.0 |
arduino:avr:pro:cpu=8MHzatmega328 | :grey_question: -12 - +36 | -0.04 - +0.12 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:robotControl | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:robotMotor | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:uno | :grey_question: -12 - +36 | -0.04 - +0.11 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:unomini | :grey_question: -12 - +36 | -0.04 - +0.11 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:unowifi | :grey_question: -12 - +36 | -0.04 - +0.11 | :green_heart: -32 - 0 | -1.56 - 0.0 |
arduino:avr:yun | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
arduino:avr:yunmini | :grey_question: -12 - +36 | -0.04 - +0.13 | :green_heart: -32 - 0 | -1.25 - 0.0 |
This originated on MCUdude/MiniCore#245
Since
twi_readFrom()
andtwi_writeTo()
are both blocking functions, there is no need to allocate a specialtwi_masterBuffer
. Doing so wastes valuable RAM, uses extra time to copy the data to the secondary buffer, and limits the transfer size toTWI_BUFFER_LENGTH
. Instead, it only needs a pointer to the buffer for the IRQ to use for the transfer.And, if asynchronous non-blocking functions are ever added, which will require a different API and callbacks, etc., then the existing
txBuffer
andrxBuffer
for slave mode can just be used there too, since master mode and slave mode can't both be active at the same time.This frees nearly 32 bytes of RAM per TWI port, which is huge on a micro that only has 2K of RAM and you are down to counting every available bit for your application.