Skip to content

Commit ff2238a

Browse files
committed
Allow conditional definition of target configs
1 parent cfe8e1c commit ff2238a

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

source/main-hw.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@
1717
#ifndef __UVISOR_HELLOWORLD_MAIN_HW_H__
1818
#define __UVISOR_HELLOWORLD_MAIN_HW_H__
1919

20-
/* The vector containing the challenge is shared with the push-button ISR, so
21-
* that it can attempt to access it from an IRQ context. */
20+
#if defined(TARGET_K64F)
2221

23-
#define LED_ON true
24-
#define LED_OFF false
25-
26-
#define MAIN_LED LED_BLUE
27-
#define HALT_LED LED_RED
28-
29-
#define MAIN_BTN SW2
30-
#define MAIN_BTN_PUPD PullUp
22+
#define MAIN_LED LED1
23+
#define SECURE_LED LED2
24+
#define LED_ON false
25+
#define LED_OFF true
26+
#define SECURE_SWITCH SW2
27+
#define SECURE_SWITCH_PULL PullUp
3128

3229
#define MAIN_ACL(acl_list_name) \
3330
static const UvisorBoxAclItem acl_list_name[] = { \
@@ -48,4 +45,10 @@
4845
{SPI0, sizeof(*SPI0), UVISOR_TACLDEF_PERIPH}, \
4946
}
5047

48+
#else /* Target-specific settings */
49+
50+
#error "Unsupported target. Checkout the README.md file for the list of supported targets for this app."
51+
52+
#endif /* Target-specific settings */
53+
5154
#endif /* __UVISOR_HELLOWORLD_MAIN_HW_H__ */

0 commit comments

Comments
 (0)