Skip to content

Commit

Permalink
firmware: rename uart_init to uart_initialize
Browse files Browse the repository at this point in the history
rename uart_init to prevent collision with pico sdk
  • Loading branch information
cyber-murmel committed Mar 2, 2024
1 parent fc331ab commit d504f7a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion firmware/src/boards/cynthion_d11/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void uart_release_pinmux(void)
* Configures the UART we'll use for our system console.
* TODO: support more configuration (parity, stop, etc.)
*/
void uart_init(bool configure_pinmux, unsigned long baudrate)
void uart_initialize(bool configure_pinmux, unsigned long baudrate)
{
// Disable the SERCOM before configuring it, to 1) ensure we're not transacting
// during configuration; and 2) as many of the registers are R/O when the SERCOM is enabled.
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/boards/cynthion_d21/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void uart_release_pinmux(void)
* Configures the UART we'll use for our system console.
* TODO: support more configuration (parity, stop, etc.)
*/
void uart_init(bool configure_pinmux, unsigned long baudrate)
void uart_initialize(bool configure_pinmux, unsigned long baudrate)
{
// Disable the SERCOM before configuring it, to 1) ensure we're not transacting
// during configuration; and 2) as many of the registers are R/O when the SERCOM is enabled.
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/boards/daisho/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @param configure_pinmux If true, the pinmux will be configured for UART use during init.
* @param baudrate The baud rate to apply, in symbols/second.
*/
void uart_init(bool configure_pinmux, unsigned long baudrate)
void uart_initialize(bool configure_pinmux, unsigned long baudrate)
{
}

Expand Down
2 changes: 1 addition & 1 deletion firmware/src/boards/qtpy/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void uart_release_pinmux(void)
* Configures the UART we'll use for our system console.
* TODO: support more configuration (parity, stop, etc.)
*/
void uart_init(bool configure_pinmux, unsigned long baudrate)
void uart_initialize(bool configure_pinmux, unsigned long baudrate)
{
// Disable the SERCOM before configuring it, to 1) ensure we're not transacting
// during configuration; and 2) as many of the registers are R/O when the SERCOM is enabled.
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/boards/samd11_xplained/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void uart_release_pinmux(void)
* Configures the UART we'll use for our system console.
* TODO: support more configuration (parity, stop, etc.)
*/
void uart_init(bool configure_pinmux, unsigned long baudrate)
void uart_initialize(bool configure_pinmux, unsigned long baudrate)
{
// Disable the SERCOM before configuring it, to 1) ensure we're not transacting
// during configuration; and 2) as many of the registers are R/O when the SERCOM is enabled.
Expand Down
6 changes: 3 additions & 3 deletions firmware/src/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void console_task(void)
*/
void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* coding)
{
uart_init(true, coding->bit_rate);
uart_initialize(true, coding->bit_rate);
}


Expand All @@ -72,13 +72,13 @@ void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* coding)
void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char)
{
if (!uart_active) {
uart_init(true, 115200);
uart_initialize(true, 115200);
}
}

void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
{
if (!uart_active) {
uart_init(true, 115200);
uart_initialize(true, 115200);
}
}
2 changes: 1 addition & 1 deletion firmware/src/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @param configure_pinmux If true, the pinmux will be configured for UART use during init.
* @param baudrate The baud rate to apply, in symbols/second.
*/
void uart_init(bool configure_pinmux, unsigned long baudrate);
void uart_initialize(bool configure_pinmux, unsigned long baudrate);

/**
* Configures the relevant UART's target's pins to be used for UART.
Expand Down

0 comments on commit d504f7a

Please sign in to comment.