mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 00:49:45 +01:00
tests/periph/selftest_shield: release UART after test
Calling `uart_poweroff()` when done with the UART test allows sharing the underlying hardware e.g. to provide other peripheral interfaces. One example of this would be the SERCOM3 on the Adafruit Metro M4 Express that is used to provide UART on D1/D0 and SPI on D11/D12/D13.
This commit is contained in:
parent
08c032a3f0
commit
e7ea668a7f
@ -790,6 +790,9 @@ static bool periph_uart_rxtx_test(uint32_t symbolrate, uint32_t timer_freq)
|
||||
failed |= TEST(memcmp(testdata, serial_buf.data, sizeof(serial_buf.data)) == 0);
|
||||
failed |= TEST(serial_buf.pos == sizeof(testdata));
|
||||
|
||||
/* disable UART again, in case it is a shared peripheral */
|
||||
uart_poweroff(UART_TEST_DEV);
|
||||
|
||||
return failed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user