-void CloseProxmark(receiver_arg* conn, char* serial_port_name) {
- pthread_mutex_lock(&conn->recv_lock);
-
- // Block the port from being used by anything
- serial_port* my_port = GetSerialPort();
- SetSerialPort(NULL);
-
- // Then close the port.
- uart_close(my_port);
- pthread_mutex_unlock(&conn->recv_lock);
-