You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment we have a separate case block in a long switch for each hardware instance (eg, every usart). This results in a lot of code being generated when the pattern for each of these instances is the same. A lookup table containing pointers to the appropriate hardware struct should be both less flash footprint (eg, 16 bytes for 8 usarts vs may switch case blocks) and should be faster (less if branches).
At the moment we have a separate case block in a long switch for each hardware instance (eg, every usart). This results in a lot of code being generated when the pattern for each of these instances is the same. A lookup table containing pointers to the appropriate hardware struct should be both less flash footprint (eg, 16 bytes for 8 usarts vs may switch case blocks) and should be faster (less if branches).
For a USART, we'd do this:
Then in the functions inside usart.c we would only need to call pgm_read_byte() on the lookup table index.
This would allow certain pin-polling specific needs in SPI API as well.
The text was updated successfully, but these errors were encountered: