Skip to content

Commit a051713

Browse files
committed
Define symbol to context pointer
1 parent fc6e970 commit a051713

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

source/led1.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ UVISOR_BOX_HEAPSIZE(3 * 1024);
2222
UVISOR_BOX_MAIN(led1_main, osPriorityNormal, 512);
2323
UVISOR_BOX_CONFIG(box_led1, acl, 512, box_context);
2424

25+
/* FIXME: The guard is needed for backwards-compatibility reasons. Remove it
26+
* when mbed OS is updated. */
27+
#ifdef __uvisor_ctx
28+
#define uvisor_ctx ((my_box_context *) __uvisor_ctx)
29+
#endif
30+
2531
static void led1_main(const void *)
2632
{
2733
DigitalOut led1(LED1);

source/led2.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ UVISOR_BOX_HEAPSIZE(3 * 1024);
2222
UVISOR_BOX_MAIN(led2_main, osPriorityNormal, 512);
2323
UVISOR_BOX_CONFIG(box_led2, acl, 512, box_context);
2424

25+
/* FIXME: The guard is needed for backwards-compatibility reasons. Remove it
26+
* when mbed OS is updated. */
27+
#ifdef __uvisor_ctx
28+
#define uvisor_ctx ((my_box_context *) __uvisor_ctx)
29+
#endif
30+
2531
static void led2_main(const void *)
2632
{
2733
DigitalOut led2(LED2);

source/led3.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ UVISOR_BOX_HEAPSIZE(3 * 1024);
2222
UVISOR_BOX_MAIN(led3_main, osPriorityNormal, 1024);
2323
UVISOR_BOX_CONFIG(box_led3, acl, 512, box_context);
2424

25+
/* FIXME: The guard is needed for backwards-compatibility reasons. Remove it
26+
* when mbed OS is updated. */
27+
#ifdef __uvisor_ctx
28+
#define uvisor_ctx ((my_box_context *) __uvisor_ctx)
29+
#endif
30+
2531
static void run_3(void)
2632
{
2733
while (1) {

0 commit comments

Comments
 (0)