Multi-threading support.
More...
|
#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...
|
|
|
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...
|
|
Multi-threading support.
◆ RTDUINO_SKETCH_LOADER
Macro to define an RTduino loader with default stack size and priority.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
◆ RTDUINO_SKETCH_LOADER_PRIO
Macro to define an RTduino loader with specified priority.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
priority | Priority of the loader thread. |
◆ RTDUINO_SKETCH_LOADER_STACKSIZE
Macro to define an RTduino loader with specified stack size.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
stack_size | Stack size of the loader thread. |
◆ RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO
Macro to define an RTduino loader with specified stack size and priority.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
stack_size | Stack size of the loader thread. |
priority | Priority of the loader thread. |
◆ RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO_INITLEVEL
#define RTDUINO_SKETCH_LOADER_STACKSIZE_PRIO_INITLEVEL |
( |
|
name, |
|
|
|
setup, |
|
|
|
loop, |
|
|
|
stack_size, |
|
|
|
priority, |
|
|
|
init_level |
|
) |
| |
Value: static int _sketch_loader(void) \
{ \
rtduino_sketch_loader_create_stacksize_prio(name,
setup,
loop, stack_size, priority);\
return 0; \
} \
init_level(_sketch_loader)
void loop(void)
Main loop function for the Arduino program.
void setup(void)
Initialization function for the Arduino environment.
Macro to define an RTduino loader with specified stack size, priority, and initialization level.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
stack_size | Stack size of the loader thread. |
priority | Priority of the loader thread. |
init_level | Initialization level macro. |
◆ rtduino_sketch_loader_create()
rt_inline rtduino_loader_t rtduino_sketch_loader_create |
( |
const char * |
name, |
|
|
void(*)(void) |
setup, |
|
|
void(*)(void) |
loop |
|
) |
| |
Creates an RTduino loader with default stack size and priority.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
- Returns
- Pointer to the created RTduino loader.
◆ rtduino_sketch_loader_create_prio()
rt_inline rtduino_loader_t rtduino_sketch_loader_create_prio |
( |
const char * |
name, |
|
|
void(*)(void) |
setup, |
|
|
void(*)(void) |
loop, |
|
|
rt_uint8_t |
priority |
|
) |
| |
Creates an RTduino loader with specified priority.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
priority | Priority of the loader thread. |
- Returns
- Pointer to the created RTduino loader.
◆ rtduino_sketch_loader_create_stacksize()
rt_inline rtduino_loader_t rtduino_sketch_loader_create_stacksize |
( |
const char * |
name, |
|
|
void(*)(void) |
setup, |
|
|
void(*)(void) |
loop, |
|
|
rt_uint32_t |
stack_size |
|
) |
| |
Creates an RTduino loader with specified stack size.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
stack_size | Stack size of the loader thread. |
- Returns
- Pointer to the created RTduino loader.
◆ rtduino_sketch_loader_create_stacksize_prio()
rtduino_loader_t rtduino_sketch_loader_create_stacksize_prio |
( |
const char * |
name, |
|
|
void(*)(void) |
setup, |
|
|
void(*)(void) |
loop, |
|
|
rt_uint32_t |
stack_size, |
|
|
rt_uint8_t |
priority |
|
) |
| |
Creates an RTduino loader with specified stack size and priority.
- Parameters
-
name | Name of the loader. |
setup | Setup function. |
loop | Loop function. |
stack_size | Stack size of the loader thread. |
priority | Priority of the loader thread. |
- Returns
- Pointer to the created RTduino loader, or RT_NULL if the creation failed.
◆ rtduino_sketch_loader_delete()
Deletes an RTduino loader.
- Parameters
-
loader | Pointer to the RTduino loader to be deleted. |
- Returns
- RT_EOK on success, negative value on failure.