Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
47 #include "drv_spi_master.h"
70 #define WAVEFORM3_REG_B28_BIT 1 << 13
77 #define WAVEFORM3_REG_HLB_BIT 1 << 12
84 #define WAVEFORM3_REG_FSEL_BIT 1 << 11
91 #define WAVEFORM3_REG_PSEL_BIT 1 << 10
97 #define WAVEFORM3_REG_RESET_BIT 1 << 8
104 #define WAVEFORM3_REG_SLEEP1_BIT 1 << 7
111 #define WAVEFORM3_REG_SLEEP12_BIT 1 << 6
118 #define WAVEFORM3_REG_OPBITEN_BIT 1 << 5
125 #define WAVEFORM3_REG_DIV2_BIT 1 << 3
132 #define WAVEFORM3_REG_MODE_BIT 1 << 1
138 #define WAVEFORM3_REG_RESET_CLEAR 0x0000
156 #define WAVEFORM3_CFG_MODE_SINUSOIDAL 0x00
162 #define WAVEFORM3_CFG_MODE_TRIANGLE 0x01
169 #define WAVEFORM3_CFG_MODE_DAC_2 0x02
175 #define WAVEFORM3_CFG_MODE_DAC 0x03
193 #define WAVEFORM3_CFG_FREQ_REG0 0x00
199 #define WAVEFORM3_CFG_FREQ_REG1 0x01
217 #define WAVEFORM3_CFG_PHASE_REG0 0x00
223 #define WAVEFORM3_CFG_PHASE_REG1 0x01
241 #define WAVEFORM3_DEFAULT_FREQ0 0
247 #define WAVEFORM3_DEFAULT_FREQ1 0
253 #define WAVEFORM3_DEFAULT_PHASE0 0
259 #define WAVEFORM3_DEFAULT_PHASE1 0
277 #define WAVEFORM3_MAP_MIKROBUS( cfg, mikrobus ) \
278 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
279 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
280 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
281 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS )
441 #endif // WAVEFORM3_H