Skip to content

Commit c896dd3

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: serial: Move esp32 serial UART API from DRAM to ROM
The API was placed in RAM to support logging stack unwinding, however device instances are also placed in ROM, so should the API instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 29c9b91 commit c896dd3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/serial/serial_esp32_usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static void serial_esp32_usb_isr(void *arg)
249249

250250
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
251251

252-
static const DRAM_ATTR struct uart_driver_api serial_esp32_usb_api = {
252+
static DEVICE_API(uart, serial_esp32_usb_api) = {
253253
.poll_in = serial_esp32_usb_poll_in,
254254
.poll_out = serial_esp32_usb_poll_out,
255255
.err_check = serial_esp32_usb_err_check,

drivers/serial/uart_esp32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ static int uart_esp32_init(const struct device *dev)
963963
return 0;
964964
}
965965

966-
static const DRAM_ATTR struct uart_driver_api uart_esp32_api = {
966+
static DEVICE_API(uart, uart_esp32_api) = {
967967
.poll_in = uart_esp32_poll_in,
968968
.poll_out = uart_esp32_poll_out,
969969
.err_check = uart_esp32_err_check,

0 commit comments

Comments
 (0)