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> |
||
---|---|---|
.. | ||
bluetil | ||
cord | ||
dhcpv6 | ||
dns | ||
ethernet | ||
fib | ||
gcoap | ||
gnrc | ||
iana | ||
ieee802154 | ||
ipv4 | ||
ipv6 | ||
lorawan | ||
nanocoap | ||
netstats | ||
ppp | ||
rpl | ||
sixlowpan | ||
skald | ||
sock | ||
af.h | ||
arp.h | ||
asymcute.h | ||
ble.h | ||
coap.h | ||
credman.h | ||
csma_sender.h | ||
dhcpv6.h | ||
dns_mock.h | ||
dns.h | ||
dsm.h | ||
dtls.h | ||
eddystone.h | ||
emcute.h | ||
ethernet.h | ||
ethertype.h | ||
eui48.h | ||
eui64.h | ||
eui_provider.h | ||
fib.h | ||
gcoap.h | ||
gnrc.h | ||
icmp.h | ||
icmpv6.h | ||
ieee802154_security.h | ||
ieee802154.h | ||
inet_csum.h | ||
ipv4.h | ||
ipv6.h | ||
l2filter.h | ||
l2util.h | ||
lora.h | ||
loramac.h | ||
mqttsn.h | ||
nanocoap_sock.h | ||
nanocoap_vfs.h | ||
nanocoap.h | ||
ndp.h | ||
netdev_test.h | ||
netif.h | ||
netopt.h | ||
netstats.h | ||
ntp_packet.h | ||
packet.h | ||
ppptype.h | ||
protnum.h | ||
sixlowpan.h | ||
skald.h | ||
sntp.h | ||
sock.h | ||
someip.h | ||
tcp.h | ||
telnet.h | ||
udp.h | ||
uhcp.h | ||
utils.h | ||
zep.h |