Skip to content

Commit f018acf

Browse files
committed
[arduino] remove the arduino part
Signed-off-by: Jean-Christophe DUBOIS <[email protected]>
1 parent 83a6181 commit f018acf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7
-7805
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
SUBDIRS = arduino ucos app
2+
SUBDIRS = ucos app
33

44
TARGET = ucos_sample
55

app/sample.c

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,17 @@
1212
#include <stdio.h>
1313
#include <stdlib.h>
1414
#include "ucos_ii.h"
15-
#include <core.h>
1615
#include <string.h>
1716

18-
int led_pin = 1;
19-
int btn_pin = 5;
20-
2117
void hardware_init()
2218
{
23-
pinMode(led_pin, OUTPUT);
2419
}
2520
/* Function common to all tasks */
2621

2722
void MyTask( void *p_arg )
2823
{
2924

3025
char* sTaskName = (char*)p_arg;
31-
static flag1 = 1;
3226
#if OS_CRITICAL_METHOD == 3
3327
OS_CPU_SR cpu_sr = 0;
3428
#endif
@@ -38,21 +32,6 @@ void MyTask( void *p_arg )
3832
/* printf uses mutex to get terminal access, therefore must enter critical section */
3933
OS_ENTER_CRITICAL();
4034
printf( "Name: %s\n", sTaskName );
41-
if(!strcmp(sTaskName,"Task 1"))
42-
{
43-
if(flag1 == 1)
44-
{
45-
flag1 = 0;
46-
printf("HIGH\n");
47-
digitalWrite(led_pin, HIGH);
48-
}
49-
else
50-
{
51-
flag1 = 1;
52-
printf("LOW\n");
53-
digitalWrite(led_pin, LOW);
54-
}
55-
}
5635
OS_EXIT_CRITICAL();
5736

5837
/* Delay so other tasks may execute. */
@@ -77,15 +56,15 @@ int main (void)
7756
char sTask2[] = "Task 2";
7857
char sTask3[] = "Task 3";
7958
char sTask4[] = "Task 4";
80-
// char sTask5[] = "Task 5";
59+
char sTask5[] = "Task 5";
8160

8261
OSInit();
8362

8463
OSTaskCreate( MyTask, sTask1, (void*)Stk1, 4 );
85-
// OSTaskCreate( MyTask, sTask2, (void*)Stk2, 5 );
86-
// OSTaskCreate( MyTask, sTask3, (void*)Stk3, 6 );
87-
// OSTaskCreate( MyTask, sTask4, (void*)Stk4, 7 );
88-
// OSTaskCreate( MyTask, sTask5, (void*)Stk5, 8 );
64+
OSTaskCreate( MyTask, sTask2, (void*)Stk2, 5 );
65+
OSTaskCreate( MyTask, sTask3, (void*)Stk3, 6 );
66+
OSTaskCreate( MyTask, sTask4, (void*)Stk4, 7 );
67+
OSTaskCreate( MyTask, sTask5, (void*)Stk5, 8 );
8968

9069
OSStart();
9170

arduino/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

arduino/Makefile

Lines changed: 0 additions & 74 deletions
This file was deleted.

arduino/hardware/arduino/cores/arduino/Arduino.h

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)