Skip to content

Commit

Permalink
Set GP7 to high impedance for a good measure
Browse files Browse the repository at this point in the history
  • Loading branch information
webhdx committed Aug 11, 2024
1 parent afaa417 commit 724307a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/picoboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#include "picoboot.pio.h"
#include "endian.h"

const uint PIN_LED = 25; // Status LED
const uint PIN_LED = 25; // Status LED
const uint PIN_LEGACY_DI = 7;

extern const uint32_t __payload[];
extern const uint32_t __payload_end[];
Expand Down Expand Up @@ -58,6 +59,11 @@ void main()
gpio_set_dir(PIN_LED, GPIO_OUT);
gpio_put(PIN_LED, true);

// set legacy DI pin GP7 to high impedance state
gpio_init(PIN_LEGACY_DI);
gpio_set_dir(PIN_LEGACY_DI, GPIO_IN);
gpio_disable_pulls(PIN_LEGACY_DI);

size_t payload_size = validate_payload();
if (payload_size == SIZE_MAX) {
while (true) {
Expand Down

0 comments on commit 724307a

Please sign in to comment.