Move to Tinyusb 0.10.0 (still with RP patches) (#462)

Most build related items have moved into <tinyusb>/hw/bsp/rp2040/family.cmake which is now the source of truth

force merging as same code save submodule was already reviewed
This commit is contained in:
Graham Sanderson
2021-06-02 13:04:08 -05:00
committed by GitHub
parent 496ff66d19
commit 561502c2da
6 changed files with 46 additions and 85 deletions

View File

@ -101,6 +101,12 @@ static inline uint uart_get_index(uart_inst_t *uart) {
return uart == uart1 ? 1 : 0;
}
static inline uart_inst_t *uart_get_instance(uint instance) {
static_assert(NUM_UARTS == 2, "");
invalid_params_if(UART, instance >= NUM_UARTS);
return instance ? uart1 : uart0;
}
static inline uart_hw_t *uart_get_hw(uart_inst_t *uart) {
uart_get_index(uart); // check it is a hw uart
return (uart_hw_t *)uart;