Files
RadioPhotonic_PCB_software/App/Devices/ds1809_device.h
2026-04-24 16:51:15 +03:00

33 lines
1.0 KiB
C

/**
* @file ds1809_device.h
* @brief DS1809 pulse-based control helper.
*/
#ifndef DS1809_DEVICE_H
#define DS1809_DEVICE_H
#include <stdint.h>
/**
* @brief Send relative UC/DC pulses using the legacy serial-command semantics.
*
* @param increment Non-zero to pulse the UC pin.
* @param decrement Non-zero to pulse the DC pin.
* @param count Number of pulses to issue.
* @param pulse_ms Low time and inter-pulse high time, in milliseconds.
*/
void ds1809_pulse(uint8_t increment, uint8_t decrement, uint16_t count, uint16_t pulse_ms);
/**
* @brief Force the DS1809 to a known absolute position above the minimum tap.
*
* The helper first overdrives the wiper all the way down to the RL terminal and
* then steps back up to the requested tap. This makes the standalone profile
* path deterministic even though the DS1809 serial command itself is relative.
*
* @param position_from_min Number of upward steps above the minimum tap.
*/
void ds1809_apply_position_from_min(uint8_t position_from_min);
#endif /* DS1809_DEVICE_H */