-void CloseProxmark(const char *serial_port_name) {
- // Clean up the port
- uart_close(sp);
- // Fix for linux, it seems that it is extremely slow to release the serial port file descriptor /dev/*
- unlink(serial_port_name);
-}
-
-int OpenProxmark(size_t i, const char *serial_port_name) {
- sp = uart_open(serial_port_name);
- if (sp == INVALID_SERIAL_PORT || sp == CLAIMED_SERIAL_PORT) {
- //poll once a second
- return 0;
- }
- return 1;
-}