Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
37 #include "drv_spi_master.h"
60 #define WAVEFORM3_REG_B28_BIT 1 << 13
67 #define WAVEFORM3_REG_HLB_BIT 1 << 12
74 #define WAVEFORM3_REG_FSEL_BIT 1 << 11
81 #define WAVEFORM3_REG_PSEL_BIT 1 << 10
87 #define WAVEFORM3_REG_RESET_BIT 1 << 8
94 #define WAVEFORM3_REG_SLEEP1_BIT 1 << 7
101 #define WAVEFORM3_REG_SLEEP12_BIT 1 << 6
108 #define WAVEFORM3_REG_OPBITEN_BIT 1 << 5
115 #define WAVEFORM3_REG_DIV2_BIT 1 << 3
122 #define WAVEFORM3_REG_MODE_BIT 1 << 1
128 #define WAVEFORM3_REG_RESET_CLEAR 0x0000
146 #define WAVEFORM3_CFG_MODE_SINUSOIDAL 0x00
152 #define WAVEFORM3_CFG_MODE_TRIANGLE 0x01
159 #define WAVEFORM3_CFG_MODE_DAC_2 0x02
165 #define WAVEFORM3_CFG_MODE_DAC 0x03
183 #define WAVEFORM3_CFG_FREQ_REG0 0x00
189 #define WAVEFORM3_CFG_FREQ_REG1 0x01
207 #define WAVEFORM3_CFG_PHASE_REG0 0x00
213 #define WAVEFORM3_CFG_PHASE_REG1 0x01
231 #define WAVEFORM3_DEFAULT_FREQ0 0
237 #define WAVEFORM3_DEFAULT_FREQ1 0
243 #define WAVEFORM3_DEFAULT_PHASE0 0
249 #define WAVEFORM3_DEFAULT_PHASE1 0
267 #define WAVEFORM3_MAP_MIKROBUS( cfg, mikrobus ) \
268 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
269 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
270 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
271 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
286 pin_name_t chip_select;
306 spi_master_mode_t spi_mode;
307 spi_master_chip_select_polarity_t cs_polarity;
431 #endif // WAVEFORM3_H