Bouffalo SDK
1.0
Bouffalolab Software Development Kit
|
#include "bflb_core.h"
Go to the source code of this file.
Macros | |
#define | DAC_CLK_DIV_16 0 |
#define | DAC_CLK_DIV_32 1 |
#define | DAC_CLK_DIV_64 3 |
#define | DAC_CLK_DIV_1 4 |
#define | DAC_CHANNEL_A (1 << 0) |
#define | DAC_CHANNEL_B (1 << 1) |
#define | DAC_VREF_INTERNAL 0 |
#define | DAC_VREF_EXTERNAL 1 |
#define | DAC_DMA_FORMAT_0 |
#define | DAC_DMA_FORMAT_1 |
Functions | |
void | bflb_dac_init (struct bflb_device_s *dev, uint8_t clk_div) |
Initialize dac frequence. Dac clk = 512K/clk_div, source clock must be 512K. More... | |
void | bflb_dac_deinit (struct bflb_device_s *dev) |
Deinitialize dac. More... | |
void | bflb_dac_link_txdma (struct bflb_device_s *dev, bool enable) |
Enable dac tx dma. More... | |
void | bflb_dac_set_dma_format (struct bflb_device_s *dev, uint8_t format) |
Set dac format in dma mode. More... | |
void | bflb_dac_channel_enable (struct bflb_device_s *dev, uint8_t ch) |
Enable dac channel. More... | |
void | bflb_dac_channel_disable (struct bflb_device_s *dev, uint8_t ch) |
Disable dac channel. More... | |
void | bflb_dac_set_value (struct bflb_device_s *dev, uint8_t ch, uint16_t value) |
Set dac output value. More... | |