Files
templates/c/set-protocol/ports/stm32g474-wavegen/set_wave_g474.h

17 lines
915 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* HAL-порт генератора STM32G474: DAC1, TIM6 и циклический DMA с 16-битными элементами.
* Проверяются конфигурация DMA и точная достижимость частоты, ограниченной 50 кГц; остановка
* выводит нулевой уровень без ожидания следующего триггера.
*/
#ifndef SET_WAVE_G474_H
#define SET_WAVE_G474_H
#include "stm32g4xx_hal.h"
#include "../../include/set_wavegen.h"
/* CubeMX owns initialization: DAC1 channel1 PA4, TIM6 TRGO_UPDATE,
* DMA_REQUEST_DAC1_CHANNEL1, circular, halfword/halfword, memory increment.
* Supply TIM6 input clock, not APB bus clock. DMA buffer in SRAM. */
typedef struct { DAC_HandleTypeDef *dac; TIM_HandleTypeDef *timer; uint32_t timer_hz; } set_wave_g474;
set_wave_port set_wave_g474_port(set_wave_g474 *context);
#endif