pschatzmann / arduino-freertos-addons Goto Github PK
View Code? Open in Web Editor NEWAdditions to FreeRTOS: C++ API
Additions to FreeRTOS: C++ API
`#include "freertos-all.h"
Queue queue(100, sizeof(size_t));
Task task("name",1000,10, { static size_t count=0; queue.Enqueue(&(++count));});
void setup() {
Serial.begin(115200);
task.Start(0);
}
void loop() {
size_t result;
queue.Dequeue(&result);
Serial.println(result);
}`
error message:
In file included from g:\Arduino IDE\libraries\freertos-addons\src/task.hpp:4:0,
from g:\Arduino IDE\libraries\freertos-addons\src/freertos-all.h:7,
from C:\Users\Administrator\AppData\Local\Temp.arduinoIDE-unsaved2023510-6320-ip9yv.qs0qqi\sketch_jun10b\sketch_jun10b.ino:1:
g:\Arduino IDE\libraries\freertos-addons\src/thread.hpp: In member function 'char* cpp_freertos::Thread::GetName()':
g:\Arduino IDE\libraries\freertos-addons\src/thread.hpp:268:40: error: 'pcTaskGetName' was not declared in this scope
return pcTaskGetName(handle);
^
In file included from g:\Arduino IDE\libraries\freertos-addons\src/freertos-all.h:18:0,
from C:\Users\Administrator\AppData\Local\Temp.arduinoIDE-unsaved2023510-6320-ip9yv.qs0qqi\sketch_jun10b\sketch_jun10b.ino:1:
g:\Arduino IDE\libraries\freertos-addons\src/critical.hpp: In static member function 'static BaseType_t cpp_freertos::CriticalSection::EnterFromISR()':
g:\Arduino IDE\libraries\freertos-addons\src/critical.hpp:94:48: error: 'taskENTER_CRITICAL_FROM_ISR' was not declared in this scope
return taskENTER_CRITICAL_FROM_ISR();
^
g:\Arduino IDE\libraries\freertos-addons\src/critical.hpp: In static member function 'static void cpp_freertos::CriticalSection::ExitFromISR(BaseType_t)':
g:\Arduino IDE\libraries\freertos-addons\src/critical.hpp:108:60: error: 'taskEXIT_CRITICAL_FROM_ISR' was not declared in this scope
taskEXIT_CRITICAL_FROM_ISR(savedInterruptStatus);
^
exit status 1
Compilation error: exit status 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.