forked from Mirrors/usk
publish
This commit is contained in:
parent
6530fd9fe5
commit
7b06aaea8e
4 changed files with 8 additions and 8 deletions
4
glitch.c
4
glitch.c
|
|
@ -134,14 +134,14 @@ int do_glitch(int delay, int width, int total_ms, int after_ms) {
|
|||
|
||||
int tries = 0;
|
||||
|
||||
// Blue pulsing implementation.
|
||||
// Green pulsing implementation.
|
||||
void inc_tries()
|
||||
{
|
||||
tries += 1;
|
||||
if(tries & 1)
|
||||
put_pixel(PIX_b);
|
||||
else
|
||||
put_pixel(PIX_blu);
|
||||
put_pixel(PIX_gre);
|
||||
}
|
||||
|
||||
// random() for glitch offset array generation
|
||||
|
|
|
|||
4
main.c
4
main.c
|
|
@ -34,7 +34,7 @@ void rewrite_payload()
|
|||
{
|
||||
put_pixel(PIX_whi);
|
||||
write_payload();
|
||||
put_pixel(PIX_blu);
|
||||
put_pixel(PIX_gre);
|
||||
// used to automatically rewrite payload when eMMC/console changes
|
||||
init_config(cid_buf + 1);
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ int main()
|
|||
// is chip reset required
|
||||
bool force_button = detect_by_pull_up(1, 0);
|
||||
// start LED
|
||||
put_pixel(PIX_blu);
|
||||
put_pixel(PIX_gre);
|
||||
// test pins
|
||||
self_test();
|
||||
// wait till the CPU has proper power & started reading the eMMC
|
||||
|
|
|
|||
2
misc.c
2
misc.c
|
|
@ -78,7 +78,7 @@ void halt_with_error(uint32_t err, uint32_t bits)
|
|||
if (success)
|
||||
put_pixel(PIX_whi);
|
||||
else
|
||||
put_pixel(PIX_yel);
|
||||
put_pixel(PIX_red);
|
||||
sleep_ms(is_long ? LONG_TIME : success ? SHORT_TIME * 2 : SHORT_TIME);
|
||||
put_pixel(0);
|
||||
if (i != bits - 1 || j != CODE_REPEATS - 1)
|
||||
|
|
|
|||
6
misc.h
6
misc.h
|
|
@ -1,5 +1,5 @@
|
|||
#define PIX_blu 0x00003F
|
||||
#define PIX_yel 0x151500
|
||||
#define PIX_gre 0xFF9900
|
||||
#define PIX_red 0xFF0000
|
||||
#define PIX_whi 0x111111
|
||||
|
||||
#define PIX_b 0x00000F
|
||||
|
|
@ -14,4 +14,4 @@ void gpio_enable_input_output(int pin);
|
|||
|
||||
void finish_pins_except_leds();
|
||||
|
||||
void reset_cpu();
|
||||
void reset_cpu();
|
||||
|
|
|
|||
Loading…
Reference in a new issue