Skip to content

Conversation

@DhruvaG2000
Copy link
Member

  • Demonstrate that direct zephyr calls can be made even with the Arduino API in use.
  • Examples shows concurrency by async blinking of 3 LEDs

Signed-off-by: Dhruva Gole goledhruva@gmail.com

- Demonstrate that direct zephyr calls can be made even with the Arduino API in use.
- Examples shows concurrency by async blinking of 3 LEDs

Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
Comment on lines +8 to +17

This example demonstrates spawning multiple threads using
:c:func:`K_THREAD_DEFINE`. It spawns two threads. Each thread is then defined
at compile time using K_THREAD_DEFINE.

These two each control an LED. These LEDs, ``led0`` and ``led1``, have
loop control and timing logic controlled by separate functions.

- ``blink0()`` controls ``led0`` and has a 100ms sleep cycle
- ``blink1()`` controls ``led1`` and has a 1000ms sleep cycle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be updated to explain all 3 LED (built-in, D10, D11) and the role of the Loop.

Comment on lines +22 to +25
The board must have two LEDs connected via GPIO pins. These are called "User
LEDs" on many of Zephyr's :ref:`boards`. The LEDs must be configured using the
``led0`` and ``led1`` :ref:`devicetree <dt-guide>` aliases, usually in the
:ref:`BOARD.dts file <devicetree-in-out-files>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still correct? It looks like the code is using pin numbers (which is great!) but this references device tree alias'

@DhruvaG2000
Copy link
Member Author

I again rebased the dev on top of this branch 🤦🏼
Now this has added all latest commits from main into this branch showing too many unnecessary files changes. I am closing this PR and creating a different branch and will cherrypick the useful commits there.

@DhruvaG2000 DhruvaG2000 deleted the eg/thread branch August 31, 2022 12:41
soburi pushed a commit to soburi/gsoc-2022-arduino-core that referenced this pull request Sep 24, 2025
…iables

resolves zephyrproject-rtos#13

And: provides for c) option in zephyrproject-rtos#14

In particular, added another config option (config16) that is initialized at beginTransaction with same
settings as config except word size set to 16 instead of 8.

Also: updated begin() to call beginTransaction with default SPISettings, and the endTransaction, such that sketches that don't call beginTransaction output at the default settings.

Changed the header file private: to protected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants