Skip to content

Commit c557af9

Browse files
committed
Add led test pass
1 parent 2b73b33 commit c557af9

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed
Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,24 @@
11
#include "hal_data.h"
2+
#include <rtdevice.h>
23

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 */
67

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-
**********************************************************************************************************************/
118
void hal_entry(void)
129
{
13-
/* TODO: add your own code here */
14-
1510
rt_kprintf("\nHello RT-Thread!\n");
1611

1712
while (1)
1813
{
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);
2322
}
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-
4023
}
41-
FSP_CPP_FOOTER
4224

43-
#endif

0 commit comments

Comments
 (0)