If it is not defined, at least some installations of GCC will use their own
stack protector implementation (creating multiple definitions of
__stack_chk_fail).
Two variables of the bootloader are persistent:
- __stack_chk_guard is used by interrupt handlers
- system_millis is used by timer interrupt and service routines
Note that currently __stack_chk_guard is shared between unprivileged
firmware and bootloader.
If we get more variables later it may make sense to make a section for
this.
According to specs, the display can handle up to 10 MHz SPI traffic
(minimum cycle time is 100 ns). This patch sets the SPI port to
7.5 MHz (60 MHz clock with divisor 8). In my tests the display works
even fine with SPI frequency at 60 MHz. I also minimized the delays
(the spec doesn't require a long setup time) and use the registers to
check when transfer is done instead of using a fixed delay.
This patch also changes the swipe function to swipe pixel by pixel.
Otherwise, the swipe would happen too fast to be seen.
This changes the display update time from 11 ms to 1.5 ms.