From fa2aba15328e2d40abe07049b7cf859bc475a7b4 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 12 Oct 2017 12:24:53 +0200 Subject: [PATCH] fix: no length tests... --- uart/uart_win32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uart/uart_win32.c b/uart/uart_win32.c index 521a3895c..03f26bfcf 100644 --- a/uart/uart_win32.c +++ b/uart/uart_win32.c @@ -123,12 +123,15 @@ bool uart_receive(const serial_port sp, byte_t* p_rx, size_t pszMaxRxLen, size_t bool uart_send(const serial_port sp, const byte_t* p_tx, const size_t len) { DWORD txlen = 0; + return WriteFile(((serial_port_windows*)sp)->hPort, p_tx, len, &txlen, NULL); + /* bool res = WriteFile(((serial_port_windows*)sp)->hPort, p_tx, len, &txlen, NULL); if ( !res ) return false; printf("TX %u\n", txlen); return (txlen != 0); + */ } bool uart_set_speed(serial_port sp, const uint32_t uiPortSpeed) {