Skip to content

Commit e50f12a

Browse files
committed
Allow conditional definition of target configs
1 parent 7a8300d commit e50f12a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

source/main-hw.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,15 @@
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+
extern DigitalOut led_red;
21+
extern DigitalOut led_green;
22+
extern DigitalOut led_blue;
23+
24+
#if defined(TARGET_K64F)
2225

2326
#define LED_ON false
2427
#define LED_OFF true
2528

26-
#define MAIN_LED LED_BLUE
27-
#define HALT_LED LED_RED
28-
29-
#define MAIN_BTN SW2
30-
#define MAIN_BTN_PUPD PullUp
31-
3229
#define MAIN_ACL(acl_list_name) \
3330
static const UvisorBoxAclItem acl_list_name[] = { \
3431
{SIM, sizeof(*SIM), UVISOR_TACLDEF_PERIPH}, \
@@ -48,8 +45,10 @@
4845
{SPI0, sizeof(*SPI0), UVISOR_TACLDEF_PERIPH}, \
4946
}
5047

51-
extern DigitalOut led_red;
52-
extern DigitalOut led_green;
53-
extern DigitalOut led_blue;
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 */
5453

5554
#endif /* __UVISOR_HELLOWORLD_MAIN_HW_H__ */

0 commit comments

Comments
 (0)