all: prepare for CGo changes in TinyGo

For details, see: https://github.com/tinygo-org/tinygo/pull/3927
This change just means we need to be more careful to use the right type,
now that types like C.uint32_t don't match to the Go equivalent (like
uint32).
This commit is contained in:
Ayke van Laethem
2023-09-22 17:56:44 +02:00
committed by Ron Evans
parent fd21e6ac9b
commit 715c33d4b0
5 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func (d Device) WriteByte(c byte) error {
switch machine.CPUFrequency() {
case 16e6: // 16MHz
C.ws2812_writeByte16(C.char(c), (*uint8)(unsafe.Pointer(port)), maskSet, maskClear)
C.ws2812_writeByte16(C.char(c), (*C.uint8_t)(unsafe.Pointer(port)), C.uint8_t(maskSet), C.uint8_t(maskClear))
interrupt.Restore(mask)
return nil
default: