Skip to content

Commit 06e66bf

Browse files
committed
Wrap base address defines with ifndef to allow overriding
1 parent 650eb73 commit 06e66bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/apps/pulp-nnx-hal/src/nnx_layer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ typedef ne16_task_flag_e nnx_task_flag_e;
3535
typedef ne16_task_data_t nnx_task_data_t;
3636

3737
// Minimal copy from ne16/bsp/ne16_pulp_bsp.c
38+
#ifndef NE16_PULP_BASE_ADDR
3839
#define NE16_PULP_BASE_ADDR (0x00201000)
40+
#endif
3941
static const ne16_dev_t nnx_dev = {
4042
.hwpe_dev = (struct hwpe_dev_t){
4143
.base_addr = (volatile uint32_t *)NE16_PULP_BASE_ADDR}};
@@ -69,7 +71,9 @@ typedef neureka_task_flag_e nnx_task_flag_e;
6971
typedef neureka_task_data_t nnx_task_data_t;
7072

7173
// Minimal copy from neureka/bsp/neureka_siracusa_bsp.c
74+
#ifndef NEUREKA_SIRACUSA_BASE_ADDR
7275
#define NEUREKA_SIRACUSA_BASE_ADDR (0x00201000)
76+
#endif
7377
static const neureka_dev_t nnx_dev = {
7478
.hwpe_dev = (struct hwpe_dev_t){
7579
.base_addr = (volatile uint32_t *)NEUREKA_SIRACUSA_BASE_ADDR}};
@@ -102,7 +106,9 @@ typedef neureka_v2_task_flag_e nnx_task_flag_e;
102106
typedef neureka_v2_task_data_t nnx_task_data_t;
103107

104108
// Minimal copy from neureka_v2/bsp/neureka_v2_siracusa_bsp.c
109+
#ifndef NEUREKA_V2_SIRACUSA_BASE_ADDR
105110
#define NEUREKA_V2_SIRACUSA_BASE_ADDR (0x00201000)
111+
#endif
106112
static const neureka_v2_dev_t nnx_dev = {
107113
.hwpe_dev = (struct hwpe_dev_t){
108114
.base_addr = (volatile uint32_t *)NEUREKA_V2_SIRACUSA_BASE_ADDR}};

0 commit comments

Comments
 (0)