From f9b2e27bab9ee9cdbebe5e2d917a80c948dd97a9 Mon Sep 17 00:00:00 2001 From: ch3 <ch3@mailbox.org> Date: Fri, 14 Jun 2019 00:06:46 +0200 Subject: [PATCH] feat(api-demo): add test function --- hw-tests/api-demo/api.h | 3 +++ hw-tests/api-demo/core1-dispatcher.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/hw-tests/api-demo/api.h b/hw-tests/api-demo/api.h index 797a3a33e..295f59b2d 100644 --- a/hw-tests/api-demo/api.h +++ b/hw-tests/api-demo/api.h @@ -18,4 +18,7 @@ typedef struct { #define API_LED 0xc0ffee API(API_LED, void api_set_led(uint8_t led, led_color_t color)); +#define API_TEST 0xdeadc0de +API(API_TEST, void api_test(char test0, short test1, int test2, long test3)); + #endif /* _API_H */ diff --git a/hw-tests/api-demo/core1-dispatcher.c b/hw-tests/api-demo/core1-dispatcher.c index cf1659abf..570a32555 100644 --- a/hw-tests/api-demo/core1-dispatcher.c +++ b/hw-tests/api-demo/core1-dispatcher.c @@ -25,6 +25,12 @@ void api_set_led(uint8_t led, led_color_t color) leds_set(led, color.red, color.green, color.blue); } +void api_test(char test0, short test1, int test2, long test3) +{ + printf ("test0: %x, test1: %x, test2: %x, test3: %x\n", + test0, test1, test2, test3); +} + int main(void) { api_init(NULL); @@ -34,6 +40,7 @@ int main(void) TMR_Delay(MXC_TMR1, MSEC(100), 0); } + #if 0 // Enable rxev on core1 MXC_GCR->evten |= 0x20; -- GitLab