Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devices: fix building of new devices (gr712rc, mcxn94x, ...) #356

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devices/flash-gr712rc/flashdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ __attribute__((constructor)) static void flashdrv_reg(void)
.init = flashdrv_init,
.done = flashdrv_done,
.ops = &opsFlashGR712RC,
}
};

hal_memset(&fdrv_common, 0, sizeof(fdrv_common));

Expand Down
15 changes: 10 additions & 5 deletions devices/flash-mcxn94x/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,20 @@ static int flashdrv_init(unsigned int minor)

__attribute__((constructor)) static void flashdrv_reg(void)
{
static const dev_handler_t h = {
.init = flashdrv_init,
.done = flashdrv_done,
static const dev_ops_t opsFlashMCXN94X = {
.read = flashdrv_read,
.write = flashdrv_write,
.erase = NULL, /* TODO */
.sync = flashdrv_sync,
.map = flashdrv_map
.map = flashdrv_map,
};

static const dev_t devFlashMCXN94X = {
.name = "flash-mcxn94x",
.init = flashdrv_init,
.done = flashdrv_done,
.ops = &opsFlashMCXN94X,
};

devs_register(DEV_STORAGE, FLASH_NO, &h);
devs_register(DEV_STORAGE, FLASH_NO, &devFlashMCXN94X);
}
15 changes: 10 additions & 5 deletions devices/flash-mps3an536/flashdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,20 @@ static int flashdrv_init(unsigned int minor)

__attribute__((constructor)) static void flashdrv_reg(void)
{
static const dev_handler_t h = {
.init = flashdrv_init,
.done = flashdrv_done,
static const dev_ops_t opsFlashMPS3AN536 = {
.read = flashdrv_read,
.write = flashdrv_write,
.erase = NULL,
.sync = flashdrv_sync,
.map = flashdrv_map
.map = flashdrv_map,
};

static const dev_t devFlashMPS3AN536 = {
.name = "flash-mps3an536",
.init = flashdrv_init,
.done = flashdrv_done,
.ops = &opsFlashMPS3AN536,
};

devs_register(DEV_STORAGE, 1, &h);
devs_register(DEV_STORAGE, 1, &devFlashMPS3AN536);
}
14 changes: 10 additions & 4 deletions devices/uart-cmsdk-apb/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,20 @@ static int uart_init(unsigned int minor)

__attribute__((constructor)) static void uart_reg(void)
{
static const dev_handler_t h = {
.init = uart_init,
.done = uart_done,
static const dev_ops_t opsUartCmsdkApb = {
.read = uart_read,
.write = uart_safeWrite,
.erase = NULL,
.sync = uart_sync,
.map = uart_map,
};

devs_register(DEV_UART, UART_MAX_CNT, &h);
static const dev_t devUartCmsdkApb = {
.name = "uart-cmsdk-apb",
.init = uart_init,
.done = uart_done,
.ops = &opsUartCmsdkApb,
};

devs_register(DEV_UART, UART_MAX_CNT, &devUartCmsdkApb);
}
13 changes: 9 additions & 4 deletions devices/uart-mcxn94x/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,20 @@ static int uart_init(unsigned int minor)

__attribute__((constructor)) static void uart_reg(void)
{
static const dev_handler_t h = {
.init = uart_init,
.done = uart_done,
static const dev_ops_t opsUartMCXN94X = {
.read = uart_read,
.write = uart_safeWrite,
.erase = NULL,
.sync = uart_sync,
.map = uart_map,
};

devs_register(DEV_UART, UART_MAX_CNT, &h);
static const dev_t devUartMCXN94X = {
.name = "uart-mcxn94x",
.init = uart_init,
.done = uart_done,
.ops = &opsUartMCXN94X,
};

devs_register(DEV_UART, UART_MAX_CNT, &devUartMCXN94X);
}
Loading