Skip to content

Commit d135e09

Browse files
committed
Add MPS2 target ACLs
1 parent 1fb9284 commit d135e09

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

source/main-hw.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#define MAIN_BTN SW2
3030
#define MAIN_BTN_PUPD PullUp
3131

32+
#if defined TARGET_K64F
33+
3234
#define MAIN_ACL(acl_list_name) \
3335
static const UvisorBoxAclItem acl_list_name[] = { \
3436
{SIM, sizeof(*SIM), UVISOR_TACLDEF_PERIPH}, \
@@ -48,6 +50,24 @@
4850
{SPI0, sizeof(*SPI0), UVISOR_TACLDEF_PERIPH}, \
4951
}
5052

53+
#elif defined TARGET_MPS2
54+
55+
#define MAIN_ACL(acl_list_name) \
56+
static const UvisorBoxAclItem acl_list_name[] = { \
57+
{CMSDK_GPIO0, sizeof(*CMSDK_GPIO0), UVISOR_TACLDEF_PERIPH}, \
58+
{CMSDK_GPIO1, sizeof(*CMSDK_GPIO1), UVISOR_TACLDEF_PERIPH}, \
59+
{CMSDK_UART0, sizeof(*CMSDK_UART0), UVISOR_TACLDEF_PERIPH}, \
60+
{CMSDK_UART1, sizeof(*CMSDK_UART1), UVISOR_TACLDEF_PERIPH}, \
61+
{CMSDK_UART2, sizeof(*CMSDK_UART2), UVISOR_TACLDEF_PERIPH}, \
62+
{CMSDK_DUALTIMER, sizeof(*CMSDK_DUALTIMER), UVISOR_TACLDEF_PERIPH}, \
63+
}
64+
65+
#else
66+
67+
#error "Target not supported."
68+
69+
#endif
70+
5171
extern DigitalOut led_red;
5272
extern DigitalOut led_green;
5373
extern DigitalOut led_blue;

0 commit comments

Comments
 (0)