|
K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
|
Data Structures | |
| struct | kfsw_temp_example_reading |
Macros | |
| #define | KFSW_TEMP_EXAMPLE_ALARM_MIN_MILLI_C (-40000) |
| #define | KFSW_TEMP_EXAMPLE_ALARM_MAX_MILLI_C 125000 |
Functions | |
| int | kfsw_temp_example_init (void) |
| int | kfsw_temp_example_get (struct kfsw_temp_example_reading *reading) |
| int | kfsw_temp_example_set_alarm (int32_t milli_c) |
| int | kfsw_temp_example_clear (void) |
Variables | |
| const struct kfsw_param_definition_set | kfsw_temp_example_param_definitions |
| const struct kfsw_command_definition_set | kfsw_temp_example_command_definitions |
A sensor read into a parameter table, for housekeeping.
| #define KFSW_TEMP_EXAMPLE_ALARM_MIN_MILLI_C (-40000) |
#include <temperature_sensor_example.h>
Lowest and highest accepted alarm threshold, the die's rated range.
| int kfsw_temp_example_clear | ( | void | ) |
#include <temperature_sensor_example.h>
Zero the read, failure and alarm counters.
The cached reading is kept.
| int kfsw_temp_example_get | ( | struct kfsw_temp_example_reading * | reading | ) |
#include <temperature_sensor_example.h>
Copy a consistent snapshot of the cached reading.
Doesn't touch the ADC, so it can be called from a parameter sample callback. Readings older than CONFIG_KFSW_TEMP_EXAMPLE_MAX_AGE_MS are returned as invalid.
| reading | Destination. |
| int kfsw_temp_example_init | ( | void | ) |
#include <temperature_sensor_example.h>
Initialize the cache and start the configured sensor.
Queues the first reading on the module's workqueue. The cache stays invalid until that read completes; initialization does not wait for a conversion.
| int kfsw_temp_example_set_alarm | ( | int32_t | milli_c | ) |
#include <temperature_sensor_example.h>
Set the alarm threshold.
Takes effect at the next reading.
| milli_c | Threshold in thousandths of a degree Celsius. |
|
extern |
#include <temperature_sensor_example.h>
Commands of the temperature example, for the app's command registry.
|
extern |
#include <temperature_sensor_example.h>
Parameter table of the temperature example.