Skip to content

Commit c4666aa

Browse files
committed
v1.0.2: Added english version of readme.md
1 parent e61f5fd commit c4666aa

19 files changed

+141
-71
lines changed

README.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,53 @@
1+
<center>
2+
3+
## [click para versión en español](https://github.com/alexCajas/WrapperFreeRTOS/blob/main/SpanishReadme.md)
4+
5+
</center>
6+
7+
8+
[![Esp8266](https://img.shields.io/badge/soc-ESP8266-green)](https://www.espressif.com/en/products/socs/esp8266)
9+
[![Esp32](https://img.shields.io/badge/soc-ESP32-orange)]()
10+
[![Arduino](https://img.shields.io/badge/platform-Arduino-green)](https://www.arduino.cc/)
11+
![C++](https://img.shields.io/badge/-C%2B%2B-red)
12+
[![FreeRTOS](https://img.shields.io/badge/-FreeRTOS-blue)](https://github.com/espressif/ESP8266_RTOS_SDK)
13+
[![RTOS](https://img.shields.io/badge/-RTOS-blue)](https://github.com/espressif/ESP8266_RTOS_SDK)
14+
[![Release](https://img.shields.io/github/v/release/alexCajas/WrapperFreeRTOS)](https://github.com/alexCajas/WrapperFreeRTOS/releases/latest)
15+
116
# WrapperFreeRTOS
217

3-
**FreeRTOS C++ Wrapper** para el fácil uso de las principales utilidades de concurrencia, de FreeRTOS, en **POO**, compatible con **Arduino core** y probado en un **ESP32**.
18+
**FreeRTOS C++ Wrapper** for easy use of the main concurrency utilities from FreeRTOS in **OOP**,compatible with **Arduino core** and tested on an **ESP32** and **ESP8266**. Note that you must to use [esp8266RTOSArdoArduCore](https://github.com/alexCajas/esp8266RTOSArduCore) to use this library with **esp8266**.
419

5-
Está basado en los wrappers de **Neil Kolban** [https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/Task.cpp], y **Richard Damon** [https://github.com/richard-damon/FreeRTOScpp/blob/master/TaskCPP.h] .
20+
It is based on the wrappers by **Neil Kolban** [https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/Task.cpp], and **Richard Damon** [https://github.com/richard-damon/FreeRTOScpp/blob/master/TaskCPP.h] .
621

722
---
823

9-
## Ejemplos:
24+
## Examples:
1025

11-
* **BasicTask:** Creación de un objecto concurrente.
26+
* **BasicTask:** Creation of a concurrent object.
1227

13-
* **BasicMutex:** Coordinación entre dos objetos concurrentes mediante mutex o semáforo binario.
28+
* **BasicMutex:** Coordination between two concurrent objects using a mutex or binary semaphore.
1429

15-
* **BasicSemaphore:** Típico problema un productor lento y varios consumidores rápidos, resuelto mediante un "counting semaphore".
30+
* **BasicSemaphore:** Typical problem of a slow producer and several fast consumers, solved using a "counting semaphore."
1631

17-
* **BasicQueue:** Envío de datos mediante QueueHandle_t entre dos objetos concurrentes.
32+
* **BasicQueue:** Data transmission using QueueHandle_t between two concurrent objects.
1833

19-
* **CrossedReferences:** Ejemplo de una posible solución entre referencias cruzadas de objetos en C++.
34+
* **CrossedReferences:** Example of a possible solution to crossed object references in C++.
2035

2136
---
2237

23-
## Adaptacion de wrappers
38+
## Wrapper Adaptation
2439

25-
* La adaptación del wrapper Task.h y Task.cpp (nKolban), consitió en sustituir la libreria std::string por Arduino.h, y redefinir toda variable y argumento tipo std::string u otros std:: por su conrrespondiente en Arduino.h, notar que se adapta según los parámetros pasados a las funciones de creación y manipulación de TaskHandle_t.
40+
* The adaptation of the Task.h and Task.cpp wrapper (nKolban) involved replacing the std::string library with Arduino.h and redefining any variable and argument of type std::string or other std:: with its corresponding in Arduino.h. Note that it adapts according to the parameters passed to the functions for creating and manipulating TaskHandle_t.
2641

27-
* Se sustituye el valor de stack size de uint8 a uint32, puesto que xcreateTask() recibe un unit32.
42+
* The stack size value is replaced from uint8 to uint32 since xcreateTask() receives a uint32.
2843

29-
* Se añade un enum (TaskPriority) que recoge el valor númerico de las distintas prioridades predefinidas en la versión de FreeRTOS usada en tu proyecto (Richard Damon).
44+
* An enum (TaskPriority) is added that collects the numeric value of the different predefined priorities in the version of FreeRTOS used in your project (Richard Damon).
3045

31-
* Se añade el método xTaskHandle getTaskHandle().
46+
* The method xTaskHandle getTaskHandle() is added.
3247

3348
---
3449

35-
## Bibliografía
50+
## Bibliography
3651

3752
* [https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/Task.cpp]
3853

SpanishReadme.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<center>
2+
3+
## [click for english version](https://github.com/alexCajas/WrapperFreeRTOS/)
4+
5+
</center>
6+
7+
8+
[![Esp8266](https://img.shields.io/badge/soc-ESP8266-green)](https://www.espressif.com/en/products/socs/esp8266)
9+
[![Esp32](https://img.shields.io/badge/soc-ESP32-orange)]()
10+
[![Arduino](https://img.shields.io/badge/platform-Arduino-green)](https://www.arduino.cc/)
11+
![C++](https://img.shields.io/badge/-C%2B%2B-red)
12+
[![FreeRTOS](https://img.shields.io/badge/-FreeRTOS-blue)](https://github.com/espressif/ESP8266_RTOS_SDK)
13+
[![RTOS](https://img.shields.io/badge/-RTOS-blue)](https://github.com/espressif/ESP8266_RTOS_SDK)
14+
[![Release](https://img.shields.io/github/v/release/alexCajas/WrapperFreeRTOS)](https://github.com/alexCajas/WrapperFreeRTOS/releases/latest)
15+
16+
# WrapperFreeRTOS
17+
18+
**FreeRTOS C++ Wrapper** para el fácil uso de las principales utilidades de concurrencia, de FreeRTOS, en **POO**, compatible con **Arduino core** y probado en un **ESP32** y **ESP8266**. Notar que necesitas usar [esp8266RTOSArdoArduCore](https://github.com/alexCajas/esp8266RTOSArduCore), para usar esta librería con **ESP8266**.
19+
20+
Está basado en los wrappers de **Neil Kolban** [https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/Task.cpp], y **Richard Damon** [https://github.com/richard-damon/FreeRTOScpp/blob/master/TaskCPP.h] .
21+
22+
---
23+
24+
## Ejemplos:
25+
26+
* **BasicTask:** Creación de un objecto concurrente.
27+
28+
* **BasicMutex:** Coordinación entre dos objetos concurrentes mediante mutex o semáforo binario.
29+
30+
* **BasicSemaphore:** Típico problema un productor lento y varios consumidores rápidos, resuelto mediante un "counting semaphore".
31+
32+
* **BasicQueue:** Envío de datos mediante QueueHandle_t entre dos objetos concurrentes.
33+
34+
* **CrossedReferences:** Ejemplo de una posible solución entre referencias cruzadas de objetos en C++.
35+
36+
---
37+
38+
## Adaptacion de wrappers
39+
40+
* La adaptación del wrapper Task.h y Task.cpp (nKolban), consitió en sustituir la libreria std::string por Arduino.h, y redefinir toda variable y argumento tipo std::string u otros std:: por su conrrespondiente en Arduino.h, notar que se adapta según los parámetros pasados a las funciones de creación y manipulación de TaskHandle_t.
41+
42+
* Se sustituye el valor de stack size de uint8 a uint32, puesto que xcreateTask() recibe un unit32.
43+
44+
* Se añade un enum (TaskPriority) que recoge el valor númerico de las distintas prioridades predefinidas en la versión de FreeRTOS usada en tu proyecto (Richard Damon).
45+
46+
* Se añade el método xTaskHandle getTaskHandle().
47+
48+
---
49+
50+
## Bibliografía
51+
52+
* [https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/Task.cpp]
53+
54+
* [https://github.com/richard-damon/FreeRTOScpp/blob/master/TaskCPP.h]
55+
56+
57+
---
58+
59+
## Licencia
60+
* MIT License

examples/BasicMutex/BasicMutex.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
22
* @file BasicMutex.ino
33
* @author Alex Cajas (https://github.com/alexCajas/WrapperFreeRTOS)
4-
* @brief En este ejemplo, se muestra como coordinar dos hilos,
5-
* mediante un mutex.
4+
* @brief In this example,
5+
* it is shown how to coordinate two threads using a mutex.
66
*
7-
* TaskHello, imprime la palabra "Hello", por pantalla.
8-
* TaskWorld, imprime la palabra "World" por pantalla.
7+
* TaskHello prints the word "Hello", by Serial terminal.
8+
* TaskWorld, prints the word "World" by Serial terminal.
99
* @version 0.1
1010
*
1111
*/
@@ -25,7 +25,7 @@ void setup(){
2525
mutexWorld = xSemaphoreCreateMutex();
2626

2727
if(mutexHello == NULL || mutexWorld == NULL ){
28-
Serial.println("fallo al crear los mutex");
28+
Serial.println("Failed to create mutex");
2929
ESP.restart();
3030
}
3131

@@ -40,5 +40,5 @@ void setup(){
4040
}
4141

4242
void loop(){
43-
// tu codigo.
43+
// your code.
4444
}

examples/BasicMutex/TaskHello.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "Task.h"
55

66
/**
7-
* @brief Imprime la palabra "Hello", por pantalla.
7+
* @brief Prints the word "Hello", by Serial terminal.
88
*
99
*/
1010
class TaskHello : public Task{

examples/BasicMutex/TaskWorld.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "Task.h"
55

66
/**
7-
* @brief Imprimer la palabra "World" por pantalla
7+
* @brief Prints the word "World", by Serial terminal
88
*
99
*/
1010
class TaskWorld : public Task{

examples/BasicQueue/BasicQueue.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* @file BasicQeueue.ino
33
* @author Alex Cajas (https://github.com/alexCajas/WrapperFreeRTOS)
4-
* @brief En este ejemplo, se muestra como coordinar dos hilos,
5-
* y pasar mensajes, mediante un mutex.
6-
* TaskHello, recibe mensaje de TaskWorldQueue y lo imprime por pantalla.
7-
* TaskWorld, recibe mensaje de TaskHelloQueue", y lo imprime por pantalla.
4+
* @brief In this example, it is demonstrated how to
5+
* coordinate two threads and exchange messages using a queue mutex.
6+
* TaskHello, TaskHello receives a message from TaskWorldQueue and prints it on the Serial terminal.
7+
* TaskWorld receives a message from TaskHelloQueue and prints it on the Serial terminal.
88
* @version 0.1
99
*
1010
*/
@@ -24,7 +24,7 @@ void setup(){
2424
queueWorld = xQueueCreate( 1, sizeof(String));
2525

2626
if(queueHello == NULL || queueWorld == NULL ){
27-
Serial.println("fallo al crear los queue");
27+
Serial.println("Failed to create the queue");
2828
ESP.restart();
2929
}
3030

@@ -36,5 +36,5 @@ void setup(){
3636
}
3737

3838
void loop(){
39-
// tu codigo.
39+
// your code
4040
}

examples/BasicQueue/TaskHelloQ.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#include "Task.h"
55

66
/**
7-
* @brief Manda y recibe un mensaje a TaskWorldQueue.
8-
*
7+
* @brief Send and receive a message from/to TaskWorldQueue.
98
*/
109
class TaskHelloQueue : public Task{
1110
private:

examples/BasicQueue/TaskWorldQ.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "Task.h"
55

66
/**
7-
* @brief Manda y recibe un mensaje de TaskHelloQueue
7+
* @brief Send and receive a message from/to TaskHelloQueue
88
*
99
*
1010
*/

examples/BasicSemaphore/BasicSemaphore.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* @file BasicSemaphore.ino
33
* @author Alex Cajas (https://github.com/alexCajas/)
4-
* @brief Ejemplo de coordinación entre consumidores rápidos
5-
* y productor lento.
4+
* @brief Example of coordination between fast consumers
5+
* and a slow producer.
66
* @version 0.1
77
*
88
*/
@@ -20,7 +20,7 @@ void setup(){
2020
semaphore = xSemaphoreCreateCounting( 5, 0 );
2121

2222
if(semaphore == NULL ){
23-
Serial.println("fallo al crear el semaphore");
23+
Serial.println("Faile to create the semaphore");
2424
ESP.restart();
2525
}
2626

@@ -35,5 +35,5 @@ void setup(){
3535
}
3636

3737
void loop(){
38-
// tu codigo.
38+
// your code.
3939
}

examples/BasicSemaphore/TaskConsummer.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#include "Task.h"
55

66
/**
7-
* @brief Ejemplo de coordinación entre consumidores rapidos
8-
* y productor lento.
7+
* @brief Faster consummer.
98
*
109
*/
1110
class TaskConsummer : public Task{

0 commit comments

Comments
 (0)