saving config added
This commit is contained in:
+5
-16
@@ -1,10 +1,6 @@
|
||||
/**
|
||||
* @file sweep.h
|
||||
* @brief Hardware-agnostic periodic staircase sweep between two output codes.
|
||||
*
|
||||
* The output steps from `min_code` up to `max_code` (inclusive) every step
|
||||
* period, then returns to `min_code` and holds it for an extra pause before
|
||||
* the next sweep starts.
|
||||
* @brief Hardware-agnostic periodic staircase sweep (see sweep_config_t).
|
||||
*/
|
||||
|
||||
#ifndef SWEEP_H
|
||||
@@ -13,16 +9,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief Host-supplied sweep parameters.
|
||||
*/
|
||||
typedef struct sweep_config_t {
|
||||
uint16_t min_code;
|
||||
uint16_t max_code;
|
||||
uint16_t step_code;
|
||||
uint16_t step_period_us;
|
||||
uint16_t pause_ms;
|
||||
} sweep_config_t;
|
||||
#include "app_types.h"
|
||||
|
||||
/**
|
||||
* @brief Sweep state advanced from the periodic tick interrupt.
|
||||
@@ -39,7 +26,9 @@ typedef struct sweep_t {
|
||||
} sweep_t;
|
||||
|
||||
/**
|
||||
* @brief Validate the configuration and start sweeping from `min_code` on the next tick.
|
||||
* @brief Validate the sweep parameters and start from `min_code` on the next tick.
|
||||
*
|
||||
* The `enabled` field of @p config is not consulted: whether to start is the caller's decision.
|
||||
*
|
||||
* @return false (sweep left stopped) if bounds, step or period are invalid.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user