![]() |
CHGame 0.3.0
Libraries for the CHGame handheld
|
The Arduino libraries the board package's core provides: SPI, Wire (I2C) and EEPROM, ported to WCH's chips. More...
Modules | |
| SPI | |
| The Arduino SPI API: SPI master on SPI1, the CH32X035's one SPI. | |
| Wire (I2C) | |
| The Arduino Wire API: I2C master (and slave) on I2C1. | |
| EEPROM | |
| The Arduino EEPROM API over the option-byte area, for the CH32V003. | |
The Arduino libraries the board package's core provides: SPI, Wire (I2C) and EEPROM, ported to WCH's chips.
These are the standard Arduino APIs, so sketches and libraries written for other boards work unchanged. On the CHGame board, note:
gfx_wait() and the next flush. The SPI class resets SPI1 and sets its own clock and mode, so hand SPI1 back to CHGfx afterwards with gfx_setSpiDiv(gfx_spiDiv()).commit() writes nothing and returns false (rewriting the option bytes its way could leave the chip read-protected), and including it prints a compiler message.