|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include "idle_port.h"Go to the source code of this file.
Classes | |
| struct | idle_config_t |
| struct | idle_result_t |
| struct | idle_t |
Macros | |
| #define | IDLE_MAX_COMMANDS_PER_WAKE 4U |
Enumerations | |
| enum | idle_event_t { IDLE_EVENT_SLEEP = 0 , IDLE_EVENT_ARM_REQUESTED , IDLE_EVENT_ERROR } |
Functions | |
| bool | idle_init (idle_t *idle, const idle_config_t *config, const idle_port_t *port, void *context) |
| bool | idle_enter (idle_t *idle, uint32_t now_ms) |
| idle_result_t | idle_on_wake (idle_t *idle, uint32_t now_ms) |
| const idle_heartbeat_t * | idle_last_heartbeat (const idle_t *idle) |
| uint16_t | idle_counts_to_mv (uint32_t raw_counts) |
| #define IDLE_MAX_COMMANDS_PER_WAKE 4U |
Definition at line 21 of file idle.h.
Referenced by idle_on_wake(), and test_command_drain_is_bounded().
| enum idle_event_t |
| uint16_t idle_counts_to_mv | ( | uint32_t | raw_counts | ) |
Definition at line 13 of file idle.c.
References IDLE_ADC_FULL_SCALE, and IDLE_MV_AT_FULL_SCALE.
Referenced by read_battery(), and test_conversion().
| bool idle_enter | ( | idle_t * | idle, |
| uint32_t | now_ms ) |
Definition at line 70 of file idle.c.
Referenced by idle_task(), anonymous_namespace{idle_e2e.cpp}::run(), setup(), and test_wake_before_enter_is_error().
| bool idle_init | ( | idle_t * | idle, |
| const idle_config_t * | config, | ||
| const idle_port_t * | port, | ||
| void * | context ) |
Definition at line 50 of file idle.c.
References config, config_valid, idle, IDLE_BATT_UNKNOWN, NULL, port, port_valid(), and SELF_TEST_PENDING.
Referenced by idle_task(), setup(), test_init_rejects_bad_input(), test_wake_before_enter_is_error(), and anonymous_namespace{idle_e2e.cpp}::world_init().
| const idle_heartbeat_t * idle_last_heartbeat | ( | const idle_t * | idle | ) |
Definition at line 211 of file idle.c.
Referenced by anonymous_namespace{idle_e2e.cpp}::check_idle_tx_fail(), anonymous_namespace{idle_e2e.cpp}::check_idle_usb(), test_failure_count_saturates(), and test_init_rejects_bad_input().
| idle_result_t idle_on_wake | ( | idle_t * | idle, |
| uint32_t | now_ms ) |
Definition at line 168 of file idle.c.
References idle, IDLE_CMD_ARM, IDLE_CMD_NONE, IDLE_EVENT_ARM_REQUESTED, IDLE_EVENT_ERROR, IDLE_EVENT_SLEEP, IDLE_MAX_COMMANDS_PER_WAKE, ms_until(), NULL, read_battery(), result, and send_heartbeat().
Referenced by idle_task(), anonymous_namespace{idle_e2e.cpp}::run(), test_arm_requested_without_heartbeat(), test_battery_read_before_transmit(), test_clock_and_sequence_wraparound(), test_command_drain_is_bounded(), test_disarm_stays_idle(), test_disarm_then_arm_in_one_wake(), test_early_lsi_wake_within_tolerance(), test_failure_count_saturates(), test_first_wake_sends_heartbeat(), test_hysteresis(), test_init_rejects_bad_input(), test_invalid_battery_still_sends(), test_long_gap_sends_one_heartbeat(), test_radio_wake_does_not_delay_heartbeat(), test_send_failure_counted_and_sleep_continues(), test_sixty_seconds_gives_six_heartbeats(), test_thresholds(), test_usb_is_never_battery_health(), and test_wake_before_enter_is_error().