Skip to content
Snippets Groups Projects
Commit 7662de76 authored by rahix's avatar rahix
Browse files

fix(serial): Make length parameter a size_t


Make the length parameter a `size_t` instead of a `intptr_t`.  A signed
value does not make any sense here and just leads to weird behavior if a
negative value is given nonetheless.

See issue card10/firmware#192

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 351ddaf8
No related branches found
No related tags found
No related merge requests found
......@@ -320,7 +320,7 @@ API(API_THERMISTOR_VOLTAGE, int epic_read_thermistor_voltage(float *result));
* :param length: Amount of bytes to print.
*/
API(API_UART_WRITE_STR, void epic_uart_write_str(
const char *str, intptr_t length
const char *str, size_t length
));
/**
......
......@@ -54,7 +54,7 @@ void serial_return_to_synchronous()
/*
* API-call to write a string. Output goes to both CDCACM and UART
*/
void epic_uart_write_str(const char *str, intptr_t length)
void epic_uart_write_str(const char *str, size_t length)
{
if (length == 0) {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment