Update main.c
This commit is contained in:
1 parent
d7f667bc61
commit
528a8f698f
1 file changed
+8
-1
@@ -94,13 +94,20 @@ int main()
|
|||||||
init_fuses();
|
init_fuses();
|
||||||
// LED & glitch & emmc PIO
|
// LED & glitch & emmc PIO
|
||||||
upload_pio();
|
upload_pio();
|
||||||
|
if (is_tiny())
|
||||||
|
{
|
||||||
|
gpio_put(led_pin(), 0);
|
||||||
|
sleep_us(100);
|
||||||
|
put_pixel(0);
|
||||||
|
sleep_us(100);
|
||||||
|
}
|
||||||
// check if this is the very first start
|
// check if this is the very first start
|
||||||
if (watchdog_caused_reboot() && boot_try == 0)
|
if (watchdog_caused_reboot() && boot_try == 0)
|
||||||
{
|
{
|
||||||
halt_with_error(1, 1);
|
halt_with_error(1, 1);
|
||||||
}
|
}
|
||||||
// is chip reset required
|
// is chip reset required
|
||||||
bool force_button = detect_by_pull_up(1, 0);
|
bool force_button = detect_by_pull(1, 0, 1);
|
||||||
// start LED
|
// start LED
|
||||||
put_pixel(PIX_blu);
|
put_pixel(PIX_blu);
|
||||||
// test pins
|
// test pins
|
||||||
|
|||||||
Reference in new issue
Block a user