RTduino Source Code Reference Manual
Classes | Macros | Typedefs | Functions
RTduino.h File Reference

RTduino Core Header File. More...

#include "Arduino.h"
+ Include dependency graph for RTduino.h:

Go to the source code of this file.

Classes

struct  rtduino_loader
 

Macros

#define RTDUINO_THREAD_SIZE   2048
 
#define RTDUINO_THREAD_PRIO   (RT_THREAD_PRIORITY_MAX - 2)
 
#define RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO_INITLEVEL(name, setup, loop, stack_size, priority, init_level)
 Macro to define an RTduino loader with specified stack size, priority, and initialization level. More...
 
#define RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO(name, setup, loop, stack_size, priority)    RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO_INITLEVEL(name, setup, loop, stack_size, priority, INIT_APP_EXPORT)
 Macro to define an RTduino loader with specified stack size and priority. More...
 
#define RTDUINO_SKETCH_LOADER(name, setup, loop)    RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO(name, setup, loop, RTDUINO_THREAD_SIZE, RTDUINO_THREAD_PRIO)
 Macro to define an RTduino loader with default stack size and priority. More...
 
#define RTDUINO_SKETCH_LOADER_PRIO(name, setup, loop, priority)    RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO(name, setup, loop, RTDUINO_THREAD_SIZE, priority)
 Macro to define an RTduino loader with specified priority. More...
 
#define RTDUINO_SKETCH_LOADER_STACKSIZE(name, setup, loop, stack_size)    RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO(name, setup, loop, stack_size, RTDUINO_THREAD_PRIO)
 Macro to define an RTduino loader with specified stack size. More...
 

Typedefs

typedef struct rtduino_loaderrtduino_loader_t
 

Functions

rt_err_t rtduino_sketch_loader_delete (rtduino_loader_t loader)
 Deletes an RTduino loader. More...
 
rtduino_loader_t rtduino_sketch_loader_create_stacksize_prio (const char *name, void(*setup)(void), void(*loop)(void), rt_uint32_t stack_size, rt_uint8_t priority)
 Creates an RTduino loader with specified stack size and priority. More...
 
rt_inline rtduino_loader_t rtduino_sketch_loader_create (const char *name, void(*setup)(void), void(*loop)(void))
 Creates an RTduino loader with default stack size and priority. More...
 
rt_inline rtduino_loader_t rtduino_sketch_loader_create_prio (const char *name, void(*setup)(void), void(*loop)(void), rt_uint8_t priority)
 Creates an RTduino loader with specified priority. More...
 
rt_inline rtduino_loader_t rtduino_sketch_loader_create_stacksize (const char *name, void(*setup)(void), void(*loop)(void), rt_uint32_t stack_size)
 Creates an RTduino loader with specified stack size. More...
 

Detailed Description

RTduino Core Header File.

Author
Meco Man
Date
2022-09-27
Version
1.0

This file is part of the RTduino project.

The RTduino.h file serves as a pivotal component in the integration of the RT-Thread Real-Time Operating System (RTOS) into Arduino sketches. It extends the core functionality provided by the Arduino.h file by introducing structures, functions, and macros essential for creating and managing real-time tasks with specified stack sizes and priorities.

This file builds upon the features of the Arduino.h file, enhancing development by introducing RT-Thread RTOS capabilities. This integration allows for efficient multitasking and real-time task execution in Arduino sketches. Notably, RTduino.h includes macros for creating RTduino loaders, critical components for effectively managing real-time tasks in Arduino programming.

Note
SPDX-License-Identifier: Apache-2.0
See also