mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Adding RP2350 SDK and target framework (#13988)
* Adding RP2350 SDK and target framework * Spacing * Removing board definitions
This commit is contained in:
parent
462cb05930
commit
2dd6f95aad
576 changed files with 435012 additions and 0 deletions
23
lib/main/pico-sdk/host/pico_stdio/stdio.c
Normal file
23
lib/main/pico-sdk/host/pico_stdio/stdio.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include "pico/stdlib.h"
|
||||
#include "hardware/uart.h"
|
||||
|
||||
int getchar_timeout_us(uint32_t timeout_us) {
|
||||
absolute_time_t t = make_timeout_time_us(timeout_us);
|
||||
while (!uart_is_readable(uart_default)) {
|
||||
if (absolute_time_diff_us(t, get_absolute_time()) > 0) {
|
||||
return STDIO_NO_INPUT;
|
||||
}
|
||||
sleep_ms(1);
|
||||
}
|
||||
return uart_getc(uart_default);
|
||||
}
|
||||
|
||||
void stdio_uart_init() {
|
||||
uart_init(uart_default, 0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue