File tree Expand file tree Collapse file tree 12 files changed +51
-20
lines changed
hardware/avr/cores/arduino.ArduinOS/ArduinOS Expand file tree Collapse file tree 12 files changed +51
-20
lines changed Original file line number Diff line number Diff line change 1+
2+ DeclareTaskLoop (SerialTask);
3+
4+ void setup () {
5+ Serial.begin (19200 );
6+
7+ pinMode (13 , OUTPUT);
8+
9+ CreateTaskLoop (SerialTask, HIGH_PRIORITY);
10+
11+
12+
13+ }
14+
15+ void loop () {
16+ digitalWrite (13 , HIGH);
17+ delay (1000 );
18+
19+ digitalWrite (13 , LOW);
20+ delay (1000 );
21+ }
22+
23+ TaskLoop (SerialTask){
24+
25+ Serial.println (millis ());
26+ DelayWithBlocked (1000 );
27+
28+ }
29+
Original file line number Diff line number Diff line change 9999// MegaOSからArduinOSへ名称変更
100100// mainLoopTaskの優先度, およびスタックサイズをスケッチ内で変更できるようにした
101101//
102+ // 2017/11/1:
103+ // Includeガードにかかりやすい問題を修正
102104*/
103105
104106/*
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ engineered and independently SIL3 certified version for use in safety and
8585mission critical applications that require provable dependability.
8686*/
8787
88- #ifndef LIST_H
89- #define LIST_H
88+ #ifndef ARDUINOS_LIST_H
89+ #define ARDUINOS_LIST_H
9090
9191#ifdef __cplusplus
9292extern "C" {
Original file line number Diff line number Diff line change 11
2- #ifndef MALLOC_H
3- #define MALLOC_H
2+ #ifndef ARDUINOS_MALLOC_H
3+ #define ARDUINOS_MALLOC_H
44
55#ifdef __cplusplus
66extern "C" {
Original file line number Diff line number Diff line change 11
2- #ifndef MALLOC_OVERRIDE_H
3- #define MALLOC_OVERRIDE_H
2+ #ifndef ARDUINOS_MALLOC_OVERRIDE_H
3+ #define ARDUINOS_MALLOC_OVERRIDE_H
44
55#include "Malloc.h"
66
Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ mission critical applications that require provable dependability.
9090// ---------------------------------------------------------
9191
9292
93- #ifndef PORTMACRO_H
94- #define PORTMACRO_H
93+ #ifndef ARDUINOS_PORTMACRO_H
94+ #define ARDUINOS_PORTMACRO_H
9595
9696// C言語でコンパイルするように宣言
9797// 関数が正しくリンクされるようにするため.
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ mission critical applications that require provable dependability.
8585*/
8686
8787
88- #ifndef PORTABLE_H
89- #define PORTABLE_H
88+ #ifndef ARDUINOS_PORTABLE_H
89+ #define ARDUINOS_PORTABLE_H
9090
9191#include "PortMacro.h"
9292
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ engineered and independently SIL3 certified version for use in safety and
8585mission critical applications that require provable dependability.
8686*/
8787
88- #ifndef PROJDEFS_H
89- #define PROJDEFS_H
88+ #ifndef ARDUINOS_PROJDEFS_H
89+ #define ARDUINOS_PROJDEFS_H
9090
9191//タスク関数が従うプロトタイプ
9292//Defines the prototype to which task functions must conform
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ mission critical applications that require provable dependability.
8686*/
8787
8888
89- #ifndef QUEUE_H
90- #define QUEUE_H
89+ #ifndef ARDUINOS_QUEUE_H
90+ #define ARDUINOS_QUEUE_H
9191
9292#ifndef ARDUINOS_H
9393 #error "include ArduinOS.h" must appear in source files before "include Queue.h"
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ engineered and independently SIL3 certified version for use in safety and
8585mission critical applications that require provable dependability.
8686*/
8787
88- #ifndef SEMAPHORE_H
89- #define SEMAPHORE_H
88+ #ifndef ARDUINOS_SEMAPHORE_H
89+ #define ARDUINOS_SEMAPHORE_H
9090
9191#ifndef ARDUINOS_H
9292#error "include ArduinOS.h" must appear in source files before "include Semaphore.h"
You can’t perform that action at this time.
0 commit comments