rt-thread/bsp/synwit/swm341/libraries/SWM341_StdPeriph_Driver/SWM341_dac.h

16 lines
418 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.

#ifndef __SWM341_DAC_H__
#define __SWM341_DAC_H__
#define DAC_FORMAT_LSB12B 0 //12位数据DHR[11:0] => DOR[11:0]
#define DAC_FORMAT_MSB12B 1 //12位数据DHR[15:4] => DOR[11:0]
#define DAC_FORMAT_8B 3 // 8位数据DHR[7 :0] => DOR[11:4]
void DAC_Init(DAC_TypeDef * DACx, uint32_t format);
void DAC_Open(DAC_TypeDef * DACx);
void DAC_Close(DAC_TypeDef * DACx);
#endif //__SWM341_DAC_H__