[riot-notifications] [RIOT-OS/RIOT] cpu/esp32: periph uart cleanups (#11276)

Gunar Schorcht notifications at github.com
Tue Mar 26 10:11:29 CET 2019

### Contribution description

This PR contains different cleanups which will make future merging with the reimplementation of ESP8266 easier. These are in detail:

- Removes the additional `_` of static symbols that has been added by mistake.
- Moves internal function `_uart_config` moved to internal function section.
- Moves external functions to external function section.
- Declares now all functions that are only used internally as static.
- Declares function `uart_set_baudrate` which is used only internally as static and renames it to `_uart_set_baudrate`.
- Now handles baudrate reconfiguration as a critical section.

### Testing procedure

Compile and flash the `tests/uart` application for a board that defines `UART_DEV(1)`, e.g., `esp32-wroom-32`:
make BOARD=esp32-wroom-32 -C tests/periph_uart flash
Connect GPIO9 and GPIO10 and execute the following test in terminal program
init 1 9600
send 1 test
You should be able to observe the following output:
> init 1 9600
Success: Initialized UART_DEV(1) at BAUD 9600
UARD_DEV(1): test uart_poweron() and uart_poweroff()  ->  [OK]
> send 1 test
UART_DEV(1) TX: test
> Success: UART_DEV(1) RX: [test]\n

### Issues/PRs references
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/esp32: additional _ removed from __uart_*
  * cpu/esp32: some uart_* funcs moved inside the file
  * cpu/esp32: _uart_config function moved
  * cpu/esp32: required uart_set_baudrate changes
  * cpu/esp32: internal uart int handler made static

-- File Changes --

    M cpu/esp32/periph/uart.c (205)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190326/7d1714a4/attachment.html>

More information about the notifications mailing list