mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-12 02:58:35 +08:00
Fix: USART calls rx/tx
This commit is contained in:
parent
dd404a67a1
commit
664434dfba
1 changed files with 3 additions and 2 deletions
|
@ -1136,7 +1136,7 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
||||||
uint8_t my_rx[sizeof(UsbCommand)];
|
uint8_t my_rx[sizeof(UsbCommand)];
|
||||||
while (!BUTTON_PRESS() && !usb_poll_validate_length()) {
|
while (!BUTTON_PRESS() && !usb_poll_validate_length()) {
|
||||||
LED_B_INV();
|
LED_B_INV();
|
||||||
if (usart_readbuffer(my_rx, sizeof(UsbCommand)) ) {
|
if (usart_readbuffer(my_rx) ) {
|
||||||
//UsbPacketReceived(my_rx, sizeof(my_rx));
|
//UsbPacketReceived(my_rx, sizeof(my_rx));
|
||||||
|
|
||||||
UsbCommand *my = (UsbCommand *)my_rx;
|
UsbCommand *my = (UsbCommand *)my_rx;
|
||||||
|
@ -1565,10 +1565,11 @@ void __attribute__((noreturn)) AppMain(void) {
|
||||||
}
|
}
|
||||||
#ifdef WITH_FPC_HOST
|
#ifdef WITH_FPC_HOST
|
||||||
// Check if there is a FPC packet available
|
// Check if there is a FPC packet available
|
||||||
if (usart_readcommand(rx) > 0) {
|
if (usart_readbuffer(rx)) {
|
||||||
reply_via_fpc = 1;
|
reply_via_fpc = 1;
|
||||||
UsbPacketReceived(rx, sizeof(rx));
|
UsbPacketReceived(rx, sizeof(rx));
|
||||||
}
|
}
|
||||||
|
usart_readcheck(rx, sizeof(rx));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Press button for one second to enter a possible standalone mode
|
// Press button for one second to enter a possible standalone mode
|
||||||
|
|
Loading…
Reference in a new issue