2018-11-01 00:18:34 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2023-11-06 08:27:30 +01:00
|
|
|
#include "sw_isr_common.h"
|
2022-05-06 10:49:15 +02:00
|
|
|
#include <zephyr/sw_isr_table.h>
|
2022-10-04 15:33:53 +02:00
|
|
|
#include <zephyr/irq.h>
|
2022-05-06 10:49:15 +02:00
|
|
|
#include <zephyr/sys/__assert.h>
|
2020-03-20 19:24:39 +01:00
|
|
|
|
2023-09-20 10:08:36 +02:00
|
|
|
/*
|
2023-11-06 08:27:30 +01:00
|
|
|
* Common code for arches that use software ISR tables (CONFIG_GEN_ISR_TABLES)
|
2023-09-20 10:08:36 +02:00
|
|
|
*/
|
2020-03-20 19:24:39 +01:00
|
|
|
|
2023-11-06 08:27:30 +01:00
|
|
|
unsigned int __weak z_get_sw_isr_table_idx(unsigned int irq)
|
2020-03-20 19:24:39 +01:00
|
|
|
{
|
2023-11-20 11:18:32 +01:00
|
|
|
unsigned int table_idx = irq - CONFIG_GEN_IRQ_START_VECTOR;
|
|
|
|
|
|
|
|
__ASSERT_NO_MSG(table_idx < IRQ_TABLE_SIZE);
|
|
|
|
|
|
|
|
return table_idx;
|
2023-09-20 10:08:36 +02:00
|
|
|
}
|