STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
idle.h File Reference
#include "idle_port.h"
Include dependency graph for idle.h:
This graph shows which files directly or indirectly include this file:

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)

Macro Definition Documentation

◆ IDLE_MAX_COMMANDS_PER_WAKE

#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().

Enumeration Type Documentation

◆ idle_event_t

Enumerator
IDLE_EVENT_SLEEP 
IDLE_EVENT_ARM_REQUESTED 
IDLE_EVENT_ERROR 

Definition at line 33 of file idle.h.

Function Documentation

◆ idle_counts_to_mv()

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().

◆ idle_enter()

bool idle_enter ( idle_t * idle,
uint32_t now_ms )

Definition at line 70 of file idle.c.

References idle, and NULL.

Referenced by idle_task(), anonymous_namespace{idle_e2e.cpp}::run(), setup(), and test_wake_before_enter_is_error().

◆ idle_init()

bool idle_init ( idle_t * idle,
const idle_config_t * config,
const idle_port_t * port,
void * context )

◆ idle_last_heartbeat()

◆ idle_on_wake()