projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update CHANGELOG.md
[proxmark3-svn]
/
uart
/
uart.h
diff --git
a/uart/uart.h
b/uart/uart.h
index fe75a683f6d6f8e346306fc86f320ac0bc62fdb2..3b563be2120c803848df7cbad01cbf5f1258cee3 100644
(file)
--- a/
uart/uart.h
+++ b/
uart/uart.h
@@
-39,7
+39,15
@@
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdbool.h>
-typedef unsigned char byte_t;
+/* Used to substitute for an example serial port path on each platform.
+ */
+#ifdef _WIN32
+#define SERIAL_PORT_H "com3"
+#elif __APPLE__
+#define SERIAL_PORT_H "/dev/tty.usbmodem*"
+#else
+#define SERIAL_PORT_H "/dev/ttyACM0"
+#endif
/* serial_port is declared as a void*, which you should cast to whatever type
* makes sense to your connection method. Both the posix and win32
/* serial_port is declared as a void*, which you should cast to whatever type
* makes sense to your connection method. Both the posix and win32
@@
-78,13
+86,13
@@
void uart_close(const serial_port sp);
* partial read may have completed into the buffer by the corresponding
* implementation, so pszRxLen should be checked to see if any data was written.
*/
* partial read may have completed into the buffer by the corresponding
* implementation, so pszRxLen should be checked to see if any data was written.
*/
-bool uart_receive(const serial_port sp,
byte
_t* pbtRx, size_t pszMaxRxLen, size_t* pszRxLen);
+bool uart_receive(const serial_port sp,
uint8
_t* pbtRx, size_t pszMaxRxLen, size_t* pszRxLen);
/* Sends a buffer to a given serial port.
* pbtTx: A pointer to a buffer containing the data to send.
* szTxLen: The amount of data to be sent.
*/
/* Sends a buffer to a given serial port.
* pbtTx: A pointer to a buffer containing the data to send.
* szTxLen: The amount of data to be sent.
*/
-bool uart_send(const serial_port sp, const
byte
_t* pbtTx, const size_t szTxLen);
+bool uart_send(const serial_port sp, const
uint8
_t* pbtTx, const size_t szTxLen);
/* Sets the current speed of the serial port, in baud.
*/
/* Sets the current speed of the serial port, in baud.
*/
Impressum
,
Datenschutz