prenticedavid / MCUFRIEND_kbv

MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields
Other
363 stars 181 forks source link

Added default MCU with Arduino API commands to access the pins #240

Closed slviajero closed 10 months ago

slviajero commented 1 year ago

This is a little change I added to use my Arduino R4 board. Instead of throwing an error if an unknown MCU is found, the code in _shield uses the standard Arduino IDE commands pinMode, digitalWrite and digitalRead. It is quite slow, my Arduino R4 is about 4 times slower than the Arduino UNO I tested. But with the change all boards with a standard Arduino port numbering can be supported.

Also, a R4 section is added to mcufriend_shield that uses the port macros of the R4 platform for write. This speeds up the display by a factor of 3 as compared to the generic code using the Arduino commands.