Add API to get the MCUs/domains names
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
8f485bcfd3
commit
3892d3e495
|
@ -1,4 +1,5 @@
|
|||
src/HW_models/BLECrypt_if.c
|
||||
src/HW_models/NHW_misc.c
|
||||
src/HW_models/NRF_PPI.c
|
||||
src/HW_models/NRF_HWLowL.c
|
||||
src/HW_models/NRF_GPIO_backend.c
|
||||
|
|
|
@ -9,6 +9,7 @@ src/HW_models/bs_compat.c
|
|||
src/HW_models/NHW_DPPI.c
|
||||
src/HW_models/NHW_CLOCK.c
|
||||
src/HW_models/NHW_EGU.c
|
||||
src/HW_models/NHW_misc.c
|
||||
src/HW_models/NHW_RNG.c
|
||||
src/HW_models/NHW_RTC.c
|
||||
src/HW_models/NHW_TIMER.c
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#if defined(NRF52833) || defined(NRF52833_XXAA)
|
||||
|
||||
#define NHW_CORE_NAMES {""}
|
||||
|
||||
#define NHW_HAS_PPI 1
|
||||
#define NHW_HAS_DPPI 0
|
||||
#define NHW_USE_MDK_TYPES 1 /* The HW registers layout types are taken from the MDK */
|
||||
|
@ -295,6 +297,8 @@
|
|||
[29] = "SWI3",\
|
||||
}}
|
||||
|
||||
#define NHW_CORE_NAMES {"Application", "Network"}
|
||||
|
||||
#define NHW_RNG_TOTAL_INST 1
|
||||
#define NHW_RNG_NET_0 0
|
||||
#define NHW_RNG_INT_MAP {{1, 9}} /*Network core, "RNG_IRQn"*/
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "NHW_config.h"
|
||||
|
||||
/*
|
||||
* Get the name of a core/domain
|
||||
*
|
||||
* Only for debugging/logging/tracing purposes.
|
||||
*/
|
||||
const char *nhw_get_core_name(unsigned int core_n)
|
||||
{
|
||||
static const char *corenames[NHW_INTCTRL_TOTAL_INST] = NHW_CORE_NAMES;
|
||||
|
||||
if (core_n < sizeof(corenames)/sizeof(corenames[0])) {
|
||||
return corenames[core_n];
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _NRF_HW_MODEL_NHW_MISC_H
|
||||
#define _NRF_HW_MODEL_NHW_MISC_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char *nhw_get_core_name(unsigned int core_n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NRF_HW_MODEL_NHW_MISC_H */
|
Loading…
Reference in New Issue