This commit is contained in:
DefenderOfHyrule 2024-07-07 21:41:06 +02:00
parent 6530fd9fe5
commit 7b06aaea8e
4 changed files with 8 additions and 8 deletions

View file

@ -134,14 +134,14 @@ int do_glitch(int delay, int width, int total_ms, int after_ms) {
int tries = 0; int tries = 0;
// Blue pulsing implementation. // Green pulsing implementation.
void inc_tries() void inc_tries()
{ {
tries += 1; tries += 1;
if(tries & 1) if(tries & 1)
put_pixel(PIX_b); put_pixel(PIX_b);
else else
put_pixel(PIX_blu); put_pixel(PIX_gre);
} }
// random() for glitch offset array generation // random() for glitch offset array generation

4
main.c
View file

@ -34,7 +34,7 @@ void rewrite_payload()
{ {
put_pixel(PIX_whi); put_pixel(PIX_whi);
write_payload(); write_payload();
put_pixel(PIX_blu); put_pixel(PIX_gre);
// used to automatically rewrite payload when eMMC/console changes // used to automatically rewrite payload when eMMC/console changes
init_config(cid_buf + 1); init_config(cid_buf + 1);
} }
@ -102,7 +102,7 @@ int main()
// is chip reset required // is chip reset required
bool force_button = detect_by_pull_up(1, 0); bool force_button = detect_by_pull_up(1, 0);
// start LED // start LED
put_pixel(PIX_blu); put_pixel(PIX_gre);
// test pins // test pins
self_test(); self_test();
// wait till the CPU has proper power & started reading the eMMC // wait till the CPU has proper power & started reading the eMMC

2
misc.c
View file

@ -78,7 +78,7 @@ void halt_with_error(uint32_t err, uint32_t bits)
if (success) if (success)
put_pixel(PIX_whi); put_pixel(PIX_whi);
else else
put_pixel(PIX_yel); put_pixel(PIX_red);
sleep_ms(is_long ? LONG_TIME : success ? SHORT_TIME * 2 : SHORT_TIME); sleep_ms(is_long ? LONG_TIME : success ? SHORT_TIME * 2 : SHORT_TIME);
put_pixel(0); put_pixel(0);
if (i != bits - 1 || j != CODE_REPEATS - 1) if (i != bits - 1 || j != CODE_REPEATS - 1)

6
misc.h
View file

@ -1,5 +1,5 @@
#define PIX_blu 0x00003F #define PIX_gre 0xFF9900
#define PIX_yel 0x151500 #define PIX_red 0xFF0000
#define PIX_whi 0x111111 #define PIX_whi 0x111111
#define PIX_b 0x00000F #define PIX_b 0x00000F
@ -14,4 +14,4 @@ void gpio_enable_input_output(int pin);
void finish_pins_except_leds(); void finish_pins_except_leds();
void reset_cpu(); void reset_cpu();