mirror of https://github.com/tinygo-org/tinygo.git
Browse Source
The `machine.Pin` type was a int8, which works fine but limits the number of pin numbers to 127. This patch changes the type to uint8 and changes NoPin to 0xff, which allows more pins to be used. Some boards might not have that many pins but their internal organization requires more pin numbers to be used (because it is organized in pin ports and not all pins in a port have a physical connection). Therefore the range of a int8 is too low to address these higher pins. This patch also has the surprising side effect of reducing binary size in a number of cases. If there is a reduction it's usually just a few bytes, with one outlier: the driver example amg88xx when compiled for the pybadge board. I have not seen any increases in binary size.pull/1197/head
Ayke van Laethem
4 years ago
committed by
Ron Evans
1 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue