Difference between revisions of "RTOS Zephyr"

From Wiki at Neela Nurseries
Jump to: navigation, search
(starting page on Zephyr RTOS notes, in the most general sense. Other Zephyr topics pages already started on this wiki.)
 
m (^ High Level Zephyr Topics: - Zephyr RTOS workspaces for RPI Pico and other boards)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<center>
 +
[[Zephyr_device_driver_model|Zephyr device drivers]] :: [[Device_tree|Device Tree]]
 +
</center>
 +
 +
 +
== [[#top|^]] Overview ==
 +
 +
2021-10-01 - This page to become central point on Neela Nurseries wiki for Zephyr RTOS notes, references and findings.
 +
 +
 +
== [[#top|^]] High Level Zephyr Topics ==
 +
 +
Zephyr RTOS workspaces for RPI Pico and other boards . . .
 +
 +
*  https://www.youtube.com/watch?v=twgPd9IQl88  Mr Green's Workshop
 +
 +
Zephyr RTOS documentation (latest) regarding sensor API, with explanation of enumerations <code>sensor_channel</code> and <code>sensor_attribute</code>:
 +
 +
High level topic "sensors":
 +
*  https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html
 +
<ul>
 +
sensor API specific topics:
 +
*  https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_trigger_type
 +
*  https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_channel
 +
*  https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_attribute.SENSOR_ATTR_CONFIGURATION <i>( available in Zephyr v2.7.99 but not v2.6.0 )</i>
 +
*  https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_channel.SENSOR_CHAN_ALL
 +
 +
sensor triggers and useful time string returning function (though may only return firmware running hours):
 +
*  https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#triggers
 +
</ul>
  
  
Line 4: Line 34:
  
 
*  https://docs.zephyrproject.org/latest/reference/kernel/threads/nothread.html#nothread
 
*  https://docs.zephyrproject.org/latest/reference/kernel/threads/nothread.html#nothread
 +
 +
 +
<!-- comment -->
 +
 +
== [[#top|^]] Sensor Channel and Attribute Enumerations Best Practices ==
 +
 +
<!-- comment -->
 +
 +
== [[#top|^]] Zephyr To Explore ==
 +
 +
What's this mbetutils test of snprintf() about?  Found while searching for Zephyr use of snprintf() function in ~/projects/zephyr-based/z4-sandbox-kionix-work/zephyr:
 +
<pre>
 +
./tests/crypto/mbedtls/src/mbedtls.c:65:#define mbedtls_snprintf  snprintf
 +
./tests/crypto/mbedtls/src/mbedtls.c:89:static int test_snprintf(size_t n, const char ref_buf[10], int ref_ret)
 +
./tests/crypto/mbedtls/src/mbedtls.c:95: ret = mbedtls_snprintf(buf, n, "%s", "123");
 +
./tests/crypto/mbedtls/src/mbedtls.c:108:static int run_test_snprintf(void)
 +
./tests/crypto/mbedtls/src/mbedtls.c:110: return (test_snprintf(0, "xxxxxxxxx", -1) != 0 ||
 +
./tests/crypto/mbedtls/src/mbedtls.c:111: test_snprintf(1, "", -1) != 0 ||
 +
./tests/crypto/mbedtls/src/mbedtls.c:112: test_snprintf(2, "1", -1) != 0 ||
 +
./tests/crypto/mbedtls/src/mbedtls.c:113: test_snprintf(3, "12", -1) != 0 ||
 +
./tests/crypto/mbedtls/src/mbedtls.c:114: test_snprintf(4, "123", 3) != 0 ||
 +
./tests/crypto/mbedtls/src/mbedtls.c:115: test_snprintf(5, "123", 3) != 0);
 +
./tests/crypto/mbedtls/src/mbedtls.c:185: * Make sure we have a snprintf that correctly zero-terminates
 +
./tests/crypto/mbedtls/src/mbedtls.c:187: if (run_test_snprintf() != 0) {
 +
./tests/crypto/mbedtls/src/mbedtls.c:188: mbedtls_printf("the snprintf implementation is broken\n");
 +
</pre>
 +
 +
 +
== [[#top|^]] References ==
 +
 +
<i>( stub section )</i>
 +
  
  
 
<!-- comment -->
 
<!-- comment -->

Latest revision as of 22:08, 19 April 2023

Zephyr device drivers :: Device Tree


^ Overview

2021-10-01 - This page to become central point on Neela Nurseries wiki for Zephyr RTOS notes, references and findings.


^ High Level Zephyr Topics

Zephyr RTOS workspaces for RPI Pico and other boards . . .

Zephyr RTOS documentation (latest) regarding sensor API, with explanation of enumerations sensor_channel and sensor_attribute:

High level topic "sensors":


Existing Zephyr notes on this wiki remain to move here. Note on Zephyr without threads:


^ Sensor Channel and Attribute Enumerations Best Practices

^ Zephyr To Explore

What's this mbetutils test of snprintf() about? Found while searching for Zephyr use of snprintf() function in ~/projects/zephyr-based/z4-sandbox-kionix-work/zephyr:

./tests/crypto/mbedtls/src/mbedtls.c:65:#define mbedtls_snprintf   snprintf
./tests/crypto/mbedtls/src/mbedtls.c:89:static int test_snprintf(size_t n, const char ref_buf[10], int ref_ret)
./tests/crypto/mbedtls/src/mbedtls.c:95:	ret = mbedtls_snprintf(buf, n, "%s", "123");
./tests/crypto/mbedtls/src/mbedtls.c:108:static int run_test_snprintf(void)
./tests/crypto/mbedtls/src/mbedtls.c:110:	return (test_snprintf(0, "xxxxxxxxx", -1) != 0 ||
./tests/crypto/mbedtls/src/mbedtls.c:111:		test_snprintf(1, "", -1) != 0 ||
./tests/crypto/mbedtls/src/mbedtls.c:112:		test_snprintf(2, "1", -1) != 0 ||
./tests/crypto/mbedtls/src/mbedtls.c:113:		test_snprintf(3, "12", -1) != 0 ||
./tests/crypto/mbedtls/src/mbedtls.c:114:		test_snprintf(4, "123", 3) != 0 ||
./tests/crypto/mbedtls/src/mbedtls.c:115:		test_snprintf(5, "123", 3) != 0);
./tests/crypto/mbedtls/src/mbedtls.c:185:	 * Make sure we have a snprintf that correctly zero-terminates
./tests/crypto/mbedtls/src/mbedtls.c:187:	if (run_test_snprintf() != 0) {
./tests/crypto/mbedtls/src/mbedtls.c:188:		mbedtls_printf("the snprintf implementation is broken\n");


^ References

( stub section )