This PR removes the heap allocation from the ili9341 driver.
before
$ tinygo flash --target feather-m4-can --size short --programmer cmsis-dap --print-allocs . -opt s ./examples/ili9341/pyportal_boing/
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\spi_atsamd51.go:21:21: object allocated on the heap: escapes at line 21
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\spi_atsamd51.go:16:16: object allocated on the heap: escapes at line 16
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\ili9341.go:308:31: object allocated on the heap: escapes at line 308
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\ili9341.go:301:31: object allocated on the heap: escapes at line 301
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\ili9341.go:270:31: object allocated on the heap: escapes at line 270
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\ili9341.go:84:19: object allocated on the heap: escapes at line 110
C:\tinygo\tinygo\src\runtime\baremetal.go:42:14: object allocated on the heap: size is not constant
C:\tinygo\tinygo\src\runtime\slice.go:30:15: object allocated on the heap: size is not constant
C:\Go\src\errors\errors.go:59:21: object allocated on the heap: escapes at line 59
C:\tinygo\tinygo\src\internal\task\task_stack.go:67:15: object allocated on the heap: size is not constant
C:\tinygo\tinygo\src\internal\task\task_stack.go:101:12: object allocated on the heap: escapes at line 103
after:
$ tinygo flash --target feather-m4-can --size short --programmer cmsis-dap --print-allocs . -opt s ./examples/ili9341/pyportal_boing/
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\spi_atsamd51.go:21:21: object allocated on the heap: escapes at line 21
C:\Users\sago3\dev\src\tinygo.org\x\drivers\ili9341\spi_atsamd51.go:16:16: object allocated on the heap: escapes at line 16
C:\tinygo\tinygo\src\runtime\baremetal.go:42:14: object allocated on the heap: size is not constant
C:\tinygo\tinygo\src\runtime\slice.go:30:15: object allocated on the heap: size is not constant
C:\Go\src\errors\errors.go:59:21: object allocated on the heap: escapes at line 59
C:\tinygo\tinygo\src\internal\task\task_stack.go:67:15: object allocated on the heap: size is not constant
C:\tinygo\tinygo\src\internal\task\task_stack.go:101:12: object allocated on the heap: escapes at line 103
This PR removes the heap allocation from the ili9341 driver.
before
after: