32bb2395c2
Kernel timeouts have always been a 32 bit integer despite the existence of generation macros, and existing code has been inconsistent about using them. Upcoming commits are going to make the timeout arguments opaque, so fix things up to be rigorously correct. Changes include: + Adding a K_TIMEOUT_EQ() macro for code that needs to compare timeout values for equality (e.g. with K_FOREVER or K_NO_WAIT). + Adding a k_msleep() synonym for k_sleep() which can continue to take integral arguments as k_sleep() moves away to timeout arguments. + Pervasively using the K_MSEC(), K_SECONDS(), et. al. macros to generate timeout arguments. + Removing the usage of K_NO_WAIT as the final argument to K_THREAD_DEFINE(). This is just a count of milliseconds and we need to use a zero. This patch include no logic changes and should not affect generated code at all. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
README.rst | ||
prj.conf | ||
sample.yaml |
README.rst
.. _blinky-sample: Blinky sample ############# Overview ******** Blinky is a simple application which blinks an LED forever. The source code shows how to configure GPIO pins as outputs, then turn them on and off. .. _blinky-sample-requirements: Requirements ************ The board must have an LED connected via a GPIO pin. These are called "User LEDs" on many of Zephyr's :ref:`boards`. The LED must be configured using the ``led0`` :ref:`dt-guide` alias in the :ref:`BOARD.dts file <devicetree-in-out-files>`. You will see this error if you try to build Blinky for an unsupported board: .. code-block:: none Unsupported board: led0 devicetree alias is not defined Building and Running ******************** Build and flash Blinky as follows, changing ``reel_board`` for your board: .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: reel_board :goals: build flash :compact: After flashing, the LED starts to blink. Blinky does not print to the console.