summaryrefslogtreecommitdiff
path: root/bsp/cypress
diff options
context:
space:
mode:
authoramy qian <[email protected]>2020-01-06 10:27:04 +0800
committeramy qian <[email protected]>2020-01-06 10:27:04 +0800
commit0ef62c7b105dcdc035d4ec67a77e16495a163348 (patch)
tree44652ef94f17043da2aaaea743f2380f757884cf /bsp/cypress
parent220343ab7e718977fc1d5377a32d41c699704c56 (diff)
删除了demo.c文件修改了main.c,相应修改了readme
Diffstat (limited to 'bsp/cypress')
-rw-r--r--bsp/cypress/psoc6-pioneerkit_modus/README.md15
-rw-r--r--bsp/cypress/psoc6-pioneerkit_modus/applications/demo.c60
-rw-r--r--bsp/cypress/psoc6-pioneerkit_modus/applications/main.c13
3 files changed, 15 insertions, 73 deletions
diff --git a/bsp/cypress/psoc6-pioneerkit_modus/README.md b/bsp/cypress/psoc6-pioneerkit_modus/README.md
index 27b113c1c2..bf886a7073 100644
--- a/bsp/cypress/psoc6-pioneerkit_modus/README.md
+++ b/bsp/cypress/psoc6-pioneerkit_modus/README.md
@@ -84,18 +84,11 @@ CY8CKIT-062-BLE PSoC6 BLE Pioneer Kit 是赛普拉斯推出的一款32位双核C
```
\ | /
- RT - Thread Operating System
- / | \ 4.0.3 build Jan 3 2020
+ / | \ 4.0.3 build Jan 6 2020
2006 - 2019 Copyright by rt-thread team
-thread1 created ok
-thread1 count: 0
-thread2 created ok
-thread2 count: 0
-thread2 count: 1
-thread2 count: 2
-thread2 count: 3
-thread1 count: 1
-thread2 count: 4
-thread2 count: 5
+hello rt-thread
+msh >hello rt-thread
+hello rt-thread
```
## 联系人信息
diff --git a/bsp/cypress/psoc6-pioneerkit_modus/applications/demo.c b/bsp/cypress/psoc6-pioneerkit_modus/applications/demo.c
deleted file mode 100644
index 84e37aedd7..0000000000
--- a/bsp/cypress/psoc6-pioneerkit_modus/applications/demo.c
+++ /dev/null
@@ -1,60 +0,0 @@
-
-#include <rtthread.h>
-#include "board.h"
-#include "cybsp.h"
-#include "cy_device_headers.h"
-#ifdef RT_USING_FINSH
-#include <finsh.h>
-#include <shell.h>
-#endif
-
-
-static rt_thread_t tid1 = RT_NULL;
-static rt_thread_t tid2 = RT_NULL;
-
-
-static void thread1_entry(void* parameter)
-{
- rt_uint32_t count = 0;
- parameter = parameter;
-
- rt_kprintf("thread1 created ok\n");
- while (1)
- {
- rt_kprintf("thread1 count: %d\n",count++);
- rt_thread_delay(RT_TICK_PER_SECOND);
-
- }
-}
-
-static void thread2_entry(void* parameter)
-{
- rt_uint32_t count = 0;
- parameter = parameter;
-
- rt_kprintf("thread2 created ok\n");
- while(1)
- {
- rt_kprintf("thread2 count: %d\n",count++);
- rt_thread_delay(RT_TICK_PER_SECOND/4);
-
- }
-
- rt_thread_delay(RT_TICK_PER_SECOND * 4);
- rt_thread_delete(tid1);
- rt_kprintf("thread1 deleted ok\n");
-}
-
-int demo_init(void)
-{
- tid1 = rt_thread_create("thread1", thread1_entry, RT_NULL, 512, 6, 10);
- if (tid1 != RT_NULL)
- rt_thread_startup(tid1);
-
- tid2 = rt_thread_create("thread2", thread2_entry, RT_NULL, 512, 6, 10);
- if (tid2 != RT_NULL)
- rt_thread_startup(tid2);
-
- return 0;
-}
-
diff --git a/bsp/cypress/psoc6-pioneerkit_modus/applications/main.c b/bsp/cypress/psoc6-pioneerkit_modus/applications/main.c
index 99008c8326..56fc49240b 100644
--- a/bsp/cypress/psoc6-pioneerkit_modus/applications/main.c
+++ b/bsp/cypress/psoc6-pioneerkit_modus/applications/main.c
@@ -43,14 +43,23 @@
#include "cycfg.h"
#include "cy_device_headers.h"
#include "cycfg_peripherals.h"
+#include <rtthread.h>
+#include "board.h"
+#include "cybsp.h"
+
+#ifdef RT_USING_FINSH
+#include <finsh.h>
+#include <shell.h>
+#endif
-extern int demo_init(void);
int main(void)
{
- demo_init();
for(;;)
{
+ rt_kprintf("hello rt-thread\n");
+ rt_thread_mdelay(1000);
+
}
}