Skip to content

Commit e5c2eb1

Browse files
committed
chore(uart): remove useless uart_write() function
Signed-off-by: Frederic Pillon <[email protected]>
1 parent b7d3851 commit e5c2eb1

File tree

2 files changed

+0
-17
lines changed
  • cores/arduino/stm32
  • libraries/SrcWrapper/src/stm32

2 files changed

+0
-17
lines changed

cores/arduino/stm32/uart.h

-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ void uart_deinit(serial_t *obj);
228228
#if defined(HAL_PWR_MODULE_ENABLED) && (defined(UART_IT_WUF) || defined(LPUART1_BASE))
229229
void uart_config_lowpower(serial_t *obj);
230230
#endif
231-
size_t uart_write(serial_t *obj, uint8_t data, uint16_t size);
232231
int uart_getc(serial_t *obj, unsigned char *c);
233232
void uart_attach_rx_callback(serial_t *obj, void (*callback)(serial_t *));
234233
void uart_attach_tx_callback(serial_t *obj, int (*callback)(serial_t *), size_t size);

libraries/SrcWrapper/src/stm32/uart.c

-16
Original file line numberDiff line numberDiff line change
@@ -660,22 +660,6 @@ void uart_config_lowpower(serial_t *obj)
660660
}
661661
#endif
662662

663-
/**
664-
* @brief write the data on the uart
665-
* @param obj : pointer to serial_t structure
666-
* @param data : byte to write
667-
* @param size : number of data to write
668-
* @retval The number of bytes written
669-
*/
670-
size_t uart_write(serial_t *obj, uint8_t data, uint16_t size)
671-
{
672-
if (HAL_UART_Transmit(uart_handlers[obj->index], &data, size, TX_TIMEOUT) == HAL_OK) {
673-
return size;
674-
} else {
675-
return 0;
676-
}
677-
}
678-
679663
/**
680664
* @brief Function called to initialize the debug uart interface
681665
* @note Call only if debug U(S)ART peripheral is not already initialized

0 commit comments

Comments
 (0)