mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
- added wrapper to use functions around tasks and queues. rtosutils is c-level, jswrap_rtos wraps utils to Espruino - added option for rtos (RTOS=1) to makefile - adding a task for reading uart and writing to a queue - use RTOS-option to switch between old polling and new queue based input - docu for the changes
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/*
|
|
* This file is part of Espruino, a JavaScript interpreter for Microcontrollers
|
|
*
|
|
* Copyright (C) 2015 Gordon Williams <gw@pur3.co.uk>
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* ----------------------------------------------------------------------------
|
|
* This file is designed to be parsed during the build process
|
|
*
|
|
* Contains ESP32 board specific function definitions.
|
|
* ----------------------------------------------------------------------------
|
|
*/
|
|
#ifndef TARGETS_JSWRAP_RTOS_H_
|
|
#define TARGETS_JSWRAP_RTOS_H_
|
|
|
|
#include "jsvar.h"
|
|
|
|
//===== Queue Library
|
|
JsVar *jswrap_Queue_constructor(JsVar *queueName);
|
|
void jswrap_Queue_read(JsVar *parent);
|
|
void jswrap_Queue_writeChar(JsVar *parent,char c);
|
|
// ==== Task handling
|
|
JsVar *jswrap_Task_constructor(JsVar *taskName);
|
|
void jswrap_Task_suspend(JsVar *parent);
|
|
void jswrap_Task_resume(JsVar *parent);
|
|
JsVar *jswrap_Task_getCurrent(JsVar *parent);
|
|
#endif /* TARGETS_JSWRAP_RTOS_H_ */
|