Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samd21: make uart_init() static #1252

Merged
merged 1 commit into from Dec 20, 2021
Merged

samd21: make uart_init() static #1252

merged 1 commit into from Dec 20, 2021

Conversation

mkj
Copy link
Contributor

@mkj mkj commented Dec 20, 2021

Avoids a linker conflict if programs are using that same function name.

Otherwise building a samd21 fork of apollo we get

/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: _build/qtpy/obj/../../firmware/src/boards/qtpy/uart.o (symbol from plugin): in function `uart_configure_pinmux':
(.text+0x0): multiple definition of `uart_init'; _build/qtpy/obj/hw/bsp/samd21/family.o (symbol from plugin):(.text+0x0): first defined here
/home/matt/3rd/fpga/apollo/lib/tinyusb/../../firmware/src/uart.h:20:6: error: type of 'uart_init' does not match original declaration [-Werror=lto-type-mismatch]
   20 | void uart_init(bool configure_pinmux, unsigned long baudrate);

Avoids a linker conflict if programs are using the same function name.
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good, thank you

@hathach hathach merged commit 693b688 into hathach:master Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants