adafruit / Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips
MIT License
450 stars 409 forks source link

Type casting for ((USB_DESC_VID << 16) | USB_DESC_UF2_PID) #262

Closed tadakado closed 2 years ago

tadakado commented 2 years ago

https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/fc487794b384ec915abccdaed12a0f2730082b90/src/usb/uf2/ghostfat.c#L509

Do we need (uint32_t) for this? I have an error when USB_DESC_VID >= 0x8000.

hathach commented 2 years ago

can you try to define both VID and PID with suffix unsigned e.g 0x8000u to see if that work. If not we would need to cast it

tadakado commented 2 years ago

It works! Perfect!!