This repository was archived by the owner on Dec 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
This repository was archived by the owner on Dec 6, 2018. It is now read-only.
Fix generation of the UART configs #365
Copy link
Copy link
Closed
Description
Generated UART configs are not valid.
Suppose, configuration JSON looks like:
{
"platform": {
"name": "tm4c",
"console": "UART0",
"uart": [
{
"id": "UART0",
"alias": "test_uart",
"comment": "UART-over-USB console output"
},
{
"id": "UART1",
"alias": "another_uart",
"comment": "Example UART"
}
]
}
}
Expected generated code:
namespace ecl
{
// UART configuration ---------------------------------------------------------
/* UART-over-USB console output */
static constexpr uart_channel UART0_channel = uart_channel::ch0;
using UART0_driver = uart<UART0_channel>;
using platform_console = UART0_driver;
using test_uart = UART0_driver;
/* Example UART */
static constexpr uart_channel UART1_channel = uart_channel::ch1;
using UART1_driver = uart<UART1_channel>;
using another_uart = UART1_driver;
} // namespace ecl
Actual:
namespace ecl
{
// UART configuration ---------------------------------------------------------
/* UART-over-USB console output */
static constexpr uart_channel template_console_dev = uart_channel::ch0;
using platform_console = uart<template_console_dev>;
/* Example UART */
static constexpr uart_channel template_console_dev = uart_channel::ch1;
using platform_console = uart<template_console_dev>;
} // namespace ecl
See: https://forgge.github.io/theCore/platform/ti-tivac-tm4c123g.html#example-output