#ifndef ESP32_C3_REGISTER_INTERFACE_H #define ESP32_C3_REGISTER_INTERFACE_H #define C3_UART_CONTROLLER_0_BASE ((uint32_t)0x60000000) #define C3_UART_CONTROLLER_1_BASE ((uint32_t)0x60010000) #define C3_UART_CONTROLLER_SELECT(base_select) ((uint32_t)((base_select == 1) ? C3_UART_CONTROLLER_1_BASE : C3_UART_CONTROLLER_0_BASE)) #define C3_UART_CLK_CONF_REG(base_select) ((volatile uint32_t *)(C3_UART_CONTROLLER_SELECT((base_select)) + 0x0078)) // UART_RST_CORE is on 23 // UART_SCLK_SEL is on 20 and 21 (2 bits), selcetion is between 1 and 3 // UART_SCLK_DIV_NUM - The integral part of the frequency divisor - 12 to 19 // UART_SCLK_DIV_A - The numerator of the frequency divisor - 6 to 11 // UART_SCLK_DIV_B - The denominator of the frequency divisor - 0 to 5 void readSetClear(); #endif