mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
fix: passing a struct.
This commit is contained in:
parent
e6315b88a1
commit
f8f39d6196
5 changed files with 7 additions and 6 deletions
|
@ -608,7 +608,7 @@ int TestProxmark(void) {
|
||||||
|
|
||||||
// reconfigure.
|
// reconfigure.
|
||||||
if ( conn.send_via_fpc == false ) {
|
if ( conn.send_via_fpc == false ) {
|
||||||
uart_reconfigure_timeouts(&sp, UART_USB_CLIENT_RX_TIMEOUT_MS );
|
uart_reconfigure_timeouts(sp, UART_USB_CLIENT_RX_TIMEOUT_MS );
|
||||||
}
|
}
|
||||||
|
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
|
|
|
@ -157,7 +157,7 @@ main_loop(char *script_cmds_file, char *script_cmd, bool pm3_present) {
|
||||||
// clear array
|
// clear array
|
||||||
memset(script_cmd_buf, 0, sizeof(script_cmd_buf));
|
memset(script_cmd_buf, 0, sizeof(script_cmd_buf));
|
||||||
// get
|
// get
|
||||||
if (!fgets(script_cmd_buf, sizeof(script_cmd_buf), stdin)) {
|
if (fgets(script_cmd_buf, sizeof(script_cmd_buf), stdin) == NULL) {
|
||||||
PrintAndLogEx(ERR, "STDIN unexpected end, exit...");
|
PrintAndLogEx(ERR, "STDIN unexpected end, exit...");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,6 @@ uint32_t uart_get_speed(const serial_port sp);
|
||||||
|
|
||||||
/* Reconfigure timeouts
|
/* Reconfigure timeouts
|
||||||
*/
|
*/
|
||||||
int uart_reconfigure_timeouts(serial_port *sp, uint32_t value );
|
int uart_reconfigure_timeouts(serial_port sp, uint32_t value );
|
||||||
#endif // _UART_H_
|
#endif // _UART_H_
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ struct timeval timeout = {
|
||||||
.tv_usec = UART_FPC_CLIENT_RX_TIMEOUT_MS * 1000
|
.tv_usec = UART_FPC_CLIENT_RX_TIMEOUT_MS * 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
int uart_reconfigure_timeouts(serial_port *sp, uint32_t value ) {
|
int uart_reconfigure_timeouts(serial_port sp, uint32_t value ) {
|
||||||
timeout.tv_usec = value * 1000;
|
timeout.tv_usec = value * 1000;
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,9 +48,10 @@ typedef struct {
|
||||||
COMMTIMEOUTS ct; // Serial port time-out configuration
|
COMMTIMEOUTS ct; // Serial port time-out configuration
|
||||||
} serial_port_windows;
|
} serial_port_windows;
|
||||||
|
|
||||||
int uart_reconfigure_timeouts(serial_port *sp, uint32_t value) {
|
int uart_reconfigure_timeouts(serial_port sp, uint32_t value) {
|
||||||
|
|
||||||
serial_port_windows *spw = (serial_port_windows*)sp;
|
serial_port_windows *spw;
|
||||||
|
spw = (serial_port_windows *)sp;
|
||||||
spw->ct.ReadIntervalTimeout = value;
|
spw->ct.ReadIntervalTimeout = value;
|
||||||
spw->ct.ReadTotalTimeoutMultiplier = 0;
|
spw->ct.ReadTotalTimeoutMultiplier = 0;
|
||||||
spw->ct.ReadTotalTimeoutConstant = value;
|
spw->ct.ReadTotalTimeoutConstant = value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue