mirror of
https://github.com/Proxmark/proxmark3.git
synced 2024-09-20 14:56:21 +08:00
Added some LED utility functions (#802)
This commit is contained in:
parent
5866c187ef
commit
3d057cfb91
|
@ -1490,11 +1490,8 @@ void __attribute__((noreturn)) AppMain(void)
|
|||
}
|
||||
common_area.flags.osimage_present = 1;
|
||||
|
||||
LED_D_OFF();
|
||||
LED_C_OFF();
|
||||
LED_B_OFF();
|
||||
LED_A_OFF();
|
||||
|
||||
LEDsoff();
|
||||
|
||||
// Init USB device
|
||||
usb_enable();
|
||||
|
||||
|
|
|
@ -810,10 +810,7 @@ done:
|
|||
AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTDIS;
|
||||
Dbprintf("%x %x %x", maxBehindBy, Uart.state, Uart.byteCnt);
|
||||
Dbprintf("%x %x %x", Uart.byteCntMax, BigBuf_get_traceLen(), (int)Uart.output[0]);
|
||||
LED_A_OFF();
|
||||
LED_B_OFF();
|
||||
LED_C_OFF();
|
||||
LED_D_OFF();
|
||||
LEDsoff();
|
||||
}
|
||||
|
||||
void rotateCSN(uint8_t* originalCSN, uint8_t* rotatedCSN) {
|
||||
|
|
|
@ -89,6 +89,22 @@ void LEDsoff()
|
|||
LED_D_OFF();
|
||||
}
|
||||
|
||||
void LEDson()
|
||||
{
|
||||
LED_A_ON();
|
||||
LED_B_ON();
|
||||
LED_C_ON();
|
||||
LED_D_ON();
|
||||
}
|
||||
|
||||
void LEDsinvert()
|
||||
{
|
||||
LED_A_INV();
|
||||
LED_B_INV();
|
||||
LED_C_INV();
|
||||
LED_D_INV();
|
||||
}
|
||||
|
||||
// LEDs: R(C) O(A) G(B) -- R(D) [1, 2, 4 and 8]
|
||||
void LED(int led, int ms)
|
||||
{
|
||||
|
|
|
@ -37,6 +37,8 @@ void lsl (uint8_t *data, size_t len);
|
|||
|
||||
void LED(int led, int ms);
|
||||
void LEDsoff();
|
||||
void LEDson();
|
||||
void LEDsinvert();
|
||||
int BUTTON_CLICKED(int ms);
|
||||
int BUTTON_HELD(int ms);
|
||||
void FormatVersionInformation(char *dst, int len, const char *prefix, void *version_information);
|
||||
|
|
Loading…
Reference in a new issue