mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
1a5cc2acbb
19365: bootloaders: fix bootloader button logic r=benpicco a=dylad ### Contribution description In lastest master, the `BTN_BOOTLOADER_INVERTED` logic doesn't work as expected. This PR fixes the underlying logic by replacing the `BTN_BOOTLOADER_INVERTED` macro definition by a runtime function. In fact the current code: ``` #ifndef BTN_BOOTLOADER_INVERTED #if (BTN0_MODE == GPIO_IN_PD) #define BTN_BOOTLOADER_INVERTED false #else #define BTN_BOOTLOADER_INVERTED true #endif #endif ``` cannot work because both `BTN0_MODE` and `GPIO_IN_PD` are not known by the precompiler as they are enum values defined at cpu level. Thus, replaces it by a runtime function in our bootloader applications. I've also add `GPIO_OD_PU` along side `GPIO_IN_PU` and add a new define (which can be override at board level or app level) in case an external pullup is used. ### Testing procedure Flash the riotboot_dfu bootloader: `make BOARD=saml21-xpro -C bootloaders/riotboot_dfu flash` Then, flash any test app: `PROGRAMMER=dfu-util USEMODULE=usbus_dfu make BOARD=saml21-xpro -C tests/shell riotboot/flash-slot0` With master, the application will not start. With this PR, the application will start after flashing. ### Issues/PRs references Fixes #19364 19366: nanocoap_sock: don't include token in empty ACK response r=benpicco a=benpicco 19367: cord: bump reference from draft to rfc r=benpicco a=bergzand ### Contribution description The draft is an RFC, this bumps the "see also" in the docs to the rfc. ### Testing procedure Check that the correct RFC is linked in the docs. ### Issues/PRs references None Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com> Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com> Co-authored-by: Koen Zandberg <koen@bergzand.net> |
||
---|---|---|
.. | ||
application_layer | ||
ble | ||
credman | ||
crosslayer | ||
dsm | ||
gnrc | ||
link_layer | ||
lora | ||
netdev_test | ||
netif | ||
netstats | ||
netutils | ||
network_layer | ||
sock | ||
transport_layer | ||
doc.txt | ||
ieee802154.txt | ||
Kconfig |