mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 12:59:44 -07:00
Added some LED utility functions (#802)
This commit is contained in:
parent
5866c187ef
commit
3d057cfb91
4 changed files with 21 additions and 9 deletions
|
@ -1490,11 +1490,8 @@ void __attribute__((noreturn)) AppMain(void)
|
||||||
}
|
}
|
||||||
common_area.flags.osimage_present = 1;
|
common_area.flags.osimage_present = 1;
|
||||||
|
|
||||||
LED_D_OFF();
|
LEDsoff();
|
||||||
LED_C_OFF();
|
|
||||||
LED_B_OFF();
|
|
||||||
LED_A_OFF();
|
|
||||||
|
|
||||||
// Init USB device
|
// Init USB device
|
||||||
usb_enable();
|
usb_enable();
|
||||||
|
|
||||||
|
|
|
@ -810,10 +810,7 @@ done:
|
||||||
AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTDIS;
|
AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTDIS;
|
||||||
Dbprintf("%x %x %x", maxBehindBy, Uart.state, Uart.byteCnt);
|
Dbprintf("%x %x %x", maxBehindBy, Uart.state, Uart.byteCnt);
|
||||||
Dbprintf("%x %x %x", Uart.byteCntMax, BigBuf_get_traceLen(), (int)Uart.output[0]);
|
Dbprintf("%x %x %x", Uart.byteCntMax, BigBuf_get_traceLen(), (int)Uart.output[0]);
|
||||||
LED_A_OFF();
|
LEDsoff();
|
||||||
LED_B_OFF();
|
|
||||||
LED_C_OFF();
|
|
||||||
LED_D_OFF();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rotateCSN(uint8_t* originalCSN, uint8_t* rotatedCSN) {
|
void rotateCSN(uint8_t* originalCSN, uint8_t* rotatedCSN) {
|
||||||
|
|
|
@ -89,6 +89,22 @@ void LEDsoff()
|
||||||
LED_D_OFF();
|
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]
|
// LEDs: R(C) O(A) G(B) -- R(D) [1, 2, 4 and 8]
|
||||||
void LED(int led, int ms)
|
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 LED(int led, int ms);
|
||||||
void LEDsoff();
|
void LEDsoff();
|
||||||
|
void LEDson();
|
||||||
|
void LEDsinvert();
|
||||||
int BUTTON_CLICKED(int ms);
|
int BUTTON_CLICKED(int ms);
|
||||||
int BUTTON_HELD(int ms);
|
int BUTTON_HELD(int ms);
|
||||||
void FormatVersionInformation(char *dst, int len, const char *prefix, void *version_information);
|
void FormatVersionInformation(char *dst, int len, const char *prefix, void *version_information);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue