tinygo-org / tinyfont

Text library for TinyGo displays
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
49 stars 12 forks source link

Unify initialization #18

Closed sago35 closed 4 years ago

sago35 commented 4 years ago

I wanted to make the example work in wioterminal as well, so I made the initialization unified to deal with it.

deadprogram commented 4 years ago

Seems legit, now merging. Thanks @sago35

deadprogram commented 4 years ago

@sago35 I noticed that the CircleCI build breaks after this PR was merged:

tinygo build -size short -o examples_displays_wioterminal.hex -target=wioterminal         ./examples/displays
# tinygo.org/x/tinyfont/examples/initdisplay
examples/initdisplay/wioterminal.go:22:15: NewSpi not declared by package ili9341
make: *** [Makefile:50: examples_displays_wioterminal.hex] Error 1

Do you have some time to look into this, please?

sago35 commented 4 years ago

I'll check it out now. @deadprogram

sago35 commented 4 years ago

https://app.circleci.com/pipelines/github/tinygo-org/tinyfont/10/workflows/0ce332dc-7fc9-4d62-bfd5-6f1cbade7dd9/jobs/11

deadprogram commented 4 years ago

I reran the build so it uses the latest dev, and now there is a different build error: https://app.circleci.com/pipelines/github/tinygo-org/tinyfont/10/workflows/ab7decc5-0fca-47d9-a0fe-84bee980633f/jobs/12

tinygo build -size short -o examples_epd.hex -target=microbit            ./examples/epd
# tinygo.org/x/tinyfont/examples/epd
examples/epd/main.go:18:22: SPI0_MOSI_PIN not declared by package machine
examples/epd/main.go:18:3: unknown field MOSI in struct literal
examples/epd/main.go:19:22: SPI0_MISO_PIN not declared by package machine
examples/epd/main.go:19:3: unknown field MISO in struct literal
make: *** [Makefile:34: examples_epd.hex] Error 1
sago35 commented 4 years ago

I created #21 to solve this problem.