+++?color=#1E1F21
@snap[north-west template-note text-white]
@snapend
+++?color=#1E1F21
@snap[north-west template-note text-white]
@snapend
+++?image=https://www.zephyrproject.org/wp-content/uploads/sites/38/2017/08/zephyr-logo.png&position=left&size=20%&color=#1E1F21 @title[Zephyr RTOS]
@snap[north-west] Zephyr™ : A SMALL, SCALABLE OPEN SOURCE RTOS FOR IOT EMBEDDED DEVICES @snapend
@snap[west text-gray] @quote[...supports multiple hardware architectures, optimized for resource constrained devices, and built with safety and security in mind](The Zephyr™ Project - The Linux Foundation) @snapend
@snap[south span-100] @size0.7em @snapend
+++?color=#1E1F21 @title[Sensor layer]
@snap[north-west] The sensor subsystem exposes an API to uniformly access sensor devices. @snapend
@snap[west list-content-verbose text-gray] @ul
- Sensors can have multiple channels, either to represent different axes of the same physical property
- Sensor devices return results as
@color[white](struct sensor_value) @ulend @snapend
@snap[south-west text-gray] This representation avoids use of floating point values as they may not be supported on certain setups. @snapend
+++?color=#1E1F21
@title[C++ functionality not yet supported in Zephyr]
@snap[north-west]
C++ functionality not yet supported in Zephyr:
@snapend
@snap[west list-content-verbose text-gray] @ul
- Dynamic object management with the new and delete operators
- Run-time type identification
- Exceptions
- Static global object destruction @ulend @snapend
+++?color=#1E1F21
@title[C++ functionality supported in Zephyr]
@snap[north-west]
While not an exhaustive list, support for the following functionality is included:
@snapend
@snap[west list-content-verbose text-gray] @ul
- Inheritance
- Virtual functions
- Virtual tables
- Static global object constructor @ulend @snapend
+++?gist=perelloc/1daae7759918dac40e1eb7174ee4929f&lang=c++&color=#1E1F21
@[10-13](generic sensor class) @[15-30](inheriting gravity/acceleration sensor) @[177-193](creating object) @[35-39](bind to device) @[45-53](using channels to set attributes) @[118-132](getting a value)
@snap[north template-note text-white] Sensor poll @snapend
+++?gist=perelloc/3288fe83b50f0591eb6081e651c0b802&color=#1E1F21 @title[poll output]
@snap[north template-note text-white] poll output @snapend
+++?gist=perelloc/17126c7d67e055e3893b7c284ffbd979&color=#1E1F21
@[1-5](sensor can be triggered) @[33-60](enabling anymotion on acceleration channel) @[7-31](adding a trigger callback handler in C)
@snap[north template-note text-white] Sensor trigger @snapend