#ifndef DRILL_PWM_STAGE_H
#define DRILL_PWM_STAGE_H
#include <stdbool.h>
#include <stdint.h>
/* Main-loop, single owner. TIM1 stopped; GPIO remains output-low, not AF.
 * Fixed candidate HSI16 timing is NOT a measured motor/driver profile. */
bool drill_pwm_stage_init(void);
bool drill_pwm_stage_available(void);
/* Unsigned full scale65535. Atomic argument validation before any CCR writes.
 * Cannot start a timer, enable channels/MOE, or grant driver RUN/SLEEP. */
bool drill_pwm_stage_write(uint16_t a,uint16_t b,uint16_t c);
/* Internal TIM1 sampling clock, all six PWM GPIO remain output-low.
 * No channel/MOE/AF/run enable. Bench-only, exclusive owner. */
bool drill_pwm_sampling_arm(void);
bool drill_pwm_sampling_available(void);
bool drill_pwm_sampling_start(void);
void drill_pwm_sampling_pause(void);
void drill_pwm_sampling_abort(void);
#endif
