projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CHG: 'lf cotag demod' - now finds FC/CN Thanks to @marshmellow42
[proxmark3-svn]
/
client
/
uart.h
diff --git
a/client/uart.h
b/client/uart.h
index 32b3e427d5b3f2d36d19ad2329621be1614b4e57..33248fb2d638fba2b8cd02acd2d8d00a77073113 100644
(file)
--- a/
client/uart.h
+++ b/
client/uart.h
@@
-37,7
+37,6
@@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdbool.h>
@@
-55,9
+54,17
@@
typedef unsigned char byte_t;
#include <sys/time.h>
#include <errno.h>
#else
#include <sys/time.h>
#include <errno.h>
#else
+ #include <time.h>
#include <windows.h>
#endif
#include <windows.h>
#endif
+typedef enum {
+ SP_INVALID = 0x00, // invalid value, error occured
+ SP_NONE = 0x01, // no parity (default)
+ SP_EVEN = 0x02, // even parity
+ SP_ODD = 0x03 // odd parity
+} serial_port_parity;
+
// Define shortcut to types to make code more readable
typedef void* serial_port;
#define INVALID_SERIAL_PORT (void*)(~1)
// Define shortcut to types to make code more readable
typedef void* serial_port;
#define INVALID_SERIAL_PORT (void*)(~1)
@@
-69,6
+76,9
@@
void uart_close(const serial_port sp);
bool uart_set_speed(serial_port sp, const uint32_t uiPortSpeed);
uint32_t uart_get_speed(const serial_port sp);
bool uart_set_speed(serial_port sp, const uint32_t uiPortSpeed);
uint32_t uart_get_speed(const serial_port sp);
+bool uart_set_parity(serial_port sp, serial_port_parity spp);
+serial_port_parity uart_get_parity(const serial_port sp);
+
bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t* pszRxLen);
bool uart_send(const serial_port sp, const byte_t* pbtTx, const size_t szTxLen);
bool uart_receive(const serial_port sp, byte_t* pbtRx, size_t* pszRxLen);
bool uart_send(const serial_port sp, const byte_t* pbtTx, const size_t szTxLen);
Impressum
,
Datenschutz