Difference between revisions of "RTOS Zephyr"
From Wiki at Neela Nurseries
m (→^ High Level Zephyr Topics) |
m (→^ High Level Zephyr Topics: - Zephyr RTOS workspaces for RPI Pico and other boards) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
== [[#top|^]] High Level Zephyr Topics == | == [[#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>: | Zephyr RTOS documentation (latest) regarding sensor API, with explanation of enumerations <code>sensor_channel</code> and <code>sensor_attribute</code>: | ||
Line 18: | Line 22: | ||
sensor API specific topics: | 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_trigger_type | ||
− | * https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_attribute.SENSOR_ATTR_CONFIGURATION | + | * 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 | * 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> | </ul> | ||
Line 29: | Line 37: | ||
<!-- comment --> | <!-- 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 == | == [[#top|^]] References == |
Latest revision as of 22:08, 19 April 2023
Contents
^ 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 . . .
- https://www.youtube.com/watch?v=twgPd9IQl88 Mr Green's Workshop
Zephyr RTOS documentation (latest) regarding sensor API, with explanation of enumerations sensor_channel
and sensor_attribute
:
High level topic "sensors":
-
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 ( available in Zephyr v2.7.99 but not v2.6.0 )
- https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_channel.SENSOR_CHAN_ALL
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 )