You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • Some days ago I got an ESP32 Dev Board. Based on Neil Kolbans work it was easy to get a first version of Espruino running. It lacks a lot of things, since Espressif is still working on SPI/I2C/BLE, ...
    Anyway we have a new world for Espruino and this world supports tasks, queues and other nice functions.
    First version of queue handling is already running

    • a seperate task polls data from somewhere and writes it to a queue
    • in Espruino a function polls this queue for new data
      Task handling is not that easy, there are some restrictions which hopefully will disappear with next versions. May be that time, we will be able to have 2 Espruino tasks running, one on each CPU talking to each other using queues.

    Target is to have JS-commands like:

    • queue.list()
    • var q = new queue()
    • q.assign(queue_name)
    • q.newDataAvailable()
    • q.readData()
    • q.writeData(.....)
    • ......
    • task.list()
    • var t = new task()
    • t.assign(task_name)
    • t.suspend()
    • t.resume()
    • ........
      We would need a list of queues and tasks like {name,handle} for that. This could be an internal jsi-type function which would be called from other tasks. Or we could add function calls in jshardware.c returning pointer to global arrays.
      This would be the first time, Espruino meets something like RTOS, therefore I would like to get some other thoughts before spending too much time walking into wrong direction.
About

Avatar for JumJum @JumJum started