Skip to content
Snippets Groups Projects
Verified Commit dbcd4030 authored by rahix's avatar rahix
Browse files

WIP: Fix uart HAL


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 8c8d49d0
No related branches found
No related tags found
No related merge requests found
......@@ -6,22 +6,7 @@
* Core UART functions to implement for a port
*/
mxc_uart_regs_t * ConsoleUart = MXC_UART_GET_UART(CONSOLE_UART);
const uart_cfg_t uart_cfg = {
.parity = UART_PARITY_DISABLE,
.size = UART_DATA_SIZE_8_BITS,
.stop = UART_STOP_1,
.flow = UART_FLOW_CTRL_DIS,
.pol = UART_FLOW_POL_DIS,
.baud = CONSOLE_BAUD,
.clksel = UART_CLKSEL_SYSTEM
};
const sys_cfg_uart_t uart_sys_cfg = {
.map = MAP_A,
.flow = Disable
};
extern mxc_uart_regs_t * ConsoleUart;
// Receive single character
int mp_hal_stdin_rx_chr(void) {
......@@ -30,5 +15,5 @@ int mp_hal_stdin_rx_chr(void) {
// Send string of given length
void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
UART_Write(ConsoleUart, str, len);
UART_Write(ConsoleUart, (uint8_t*)str, len);
}
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