|
1 | 1 | #include "hal_data.h" |
| 2 | +#include <rtdevice.h> |
2 | 3 |
|
3 | | -FSP_CPP_HEADER |
4 | | -void R_BSP_WarmStart(bsp_warm_start_event_t event); |
5 | | -FSP_CPP_FOOTER |
| 4 | +#define LED1_PIN BSP_IO_PORT_02_PIN_07 /* Onboard LED pins */ |
| 5 | +#define LED2_PIN BSP_IO_PORT_01_PIN_04 /* Onboard LED pins */ |
| 6 | +#define LED3_PIN BSP_IO_PORT_01_PIN_12 /* Onboard LED pins */ |
6 | 7 |
|
7 | | -/*******************************************************************************************************************//** |
8 | | - * main() is generated by the RA Configuration editor and is used to generate threads if an RTOS is used. This function |
9 | | - * is called by main() when no RTOS is used. |
10 | | - **********************************************************************************************************************/ |
11 | 8 | void hal_entry(void) |
12 | 9 | { |
13 | | - /* TODO: add your own code here */ |
14 | | - |
15 | 10 | rt_kprintf("\nHello RT-Thread!\n"); |
16 | 11 |
|
17 | 12 | while (1) |
18 | 13 | { |
19 | | - // rt_pin_write(LED1_PIN, PIN_HIGH); |
20 | | - // rt_thread_mdelay(500); |
21 | | - // rt_pin_write(LED1_PIN, PIN_LOW); |
22 | | - // rt_thread_mdelay(500); |
| 14 | + rt_pin_write(LED1_PIN, PIN_HIGH); |
| 15 | + rt_pin_write(LED2_PIN, PIN_HIGH); |
| 16 | + rt_pin_write(LED3_PIN, PIN_HIGH); |
| 17 | + rt_thread_mdelay(500); |
| 18 | + rt_pin_write(LED1_PIN, PIN_LOW); |
| 19 | + rt_pin_write(LED2_PIN, PIN_LOW); |
| 20 | + rt_pin_write(LED3_PIN, PIN_LOW); |
| 21 | + rt_thread_mdelay(500); |
23 | 22 | } |
24 | | -#if BSP_TZ_SECURE_BUILD |
25 | | - /* Enter non-secure code */ |
26 | | - R_BSP_NonSecureEnter(); |
27 | | -#endif |
28 | | -} |
29 | | - |
30 | | - |
31 | | -#if BSP_TZ_SECURE_BUILD |
32 | | - |
33 | | -FSP_CPP_HEADER |
34 | | -BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable (); |
35 | | - |
36 | | -/* Trustzone Secure Projects require at least one nonsecure callable function in order to build (Remove this if it is not required to build). */ |
37 | | -BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable () |
38 | | -{ |
39 | | - |
40 | 23 | } |
41 | | -FSP_CPP_FOOTER |
42 | 24 |
|
43 | | -#endif |
0 commit comments