Skip to content
Snippets Groups Projects
Commit 26593051 authored by schneider's avatar schneider
Browse files

chore(serial): Make clear what goes where

parent 38f168b2
No related branches found
No related tags found
1 merge request!446Initial MicroPython BLE support (GATTS)
......@@ -127,11 +127,18 @@ static void write_str_(const char *str, size_t length)
}
/*
* API-call to write a string. Output goes to both CDCACM, UART and BLE
* API-call to write a string. Output goes to CDCACM, UART and BLE
*
* This is user data from core 1.
*/
void epic_uart_write_str(const char *str, size_t length)
{
ble_uart_write((uint8_t *)str, length);
/* Make sure that we are not in an interrupt when talking to BLE.
* Should not be the case if this is called from core 1
* anyways. */
if (!xPortIsInsideInterrupt()) {
ble_uart_write((uint8_t *)str, length);
}
write_str_(str, length);
}
......@@ -202,7 +209,6 @@ static void serial_flush_from_thread(void)
taskEXIT_CRITICAL();
cdcacm_write((uint8_t *)&rx_data, received_bytes);
//ble_uart_write((uint8_t *)&rx_data, received_bytes);
} while (received_bytes > 0);
}
......@@ -250,7 +256,9 @@ int epic_uart_read_str(char *buf, size_t cnt)
}
/*
* Write a string. Output goes to both CDCACM and UART
* Write a string from epicardium. Output goes to CDCACM and UART
*
* This mainly log data from epicardium, not user date from core 1.
*/
long _write_epicardium(int fd, const char *buf, size_t cnt)
{
......
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