test prog implementation moved to real driver/board implementations
This commit is contained in:
@@ -15,7 +15,10 @@ struct stm32f4_pwm {
|
||||
TIM_HandleTypeDef *timer_handle;
|
||||
TIM_OC_InitTypeDef *output_compare_cfg;
|
||||
TIM_MasterConfigTypeDef *master_cfg;
|
||||
TIM_IC_InitTypeDef *input_capture_init;
|
||||
TIM_SlaveConfigTypeDef *slave_config;
|
||||
uint32_t channel;
|
||||
uint32_t timer_src_frequency_MHz;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -23,11 +26,15 @@ struct stm32f4_pwm {
|
||||
int stm32f4_pwm_open(const void *pwm);
|
||||
int stm32f4_pwm_close(const void *pwm);
|
||||
int stm32f4_pwm_set_duty_cycle(const void *pwm, unsigned int duty_cycle_percent);
|
||||
int stm32f4_pwm_get_period_ns(const void *pwm);
|
||||
int stm32f4_pwm_get_pulse_width_ns(const void *pwm);
|
||||
|
||||
static const struct pwm_fp stm32f4_pwm_fp = {
|
||||
.open = stm32f4_pwm_open,
|
||||
.close = stm32f4_pwm_close,
|
||||
.set_duty_cycle = stm32f4_pwm_set_duty_cycle,
|
||||
.get_period = stm32f4_pwm_get_period_ns,
|
||||
.get_pulse_width = stm32f4_pwm_get_pulse_width_ns,
|
||||
};
|
||||
|
||||
#endif /* SOURCE_FIRMWARE_ARCH_STM32F4XX_DRIVER_INCLUDE_STM32F4_PWM_H_ */
|
||||
|
Reference in New Issue
Block a user