Go to the documentation of this file.
39 #ifdef PREINIT_SUPPORTED
43 #ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49 #include "drv_digital_out.h"
50 #include "drv_digital_in.h"
51 #include "drv_i2c_master.h"
52 #include "drv_spi_master.h"
75 #define WAVEFORM2_CFG_B28_MSK 0x2000
76 #define WAVEFORM2_CFG_HLB_MSK 0x1000
77 #define WAVEFORM2_CFG_FSEL_MSK 0x0800
78 #define WAVEFORM2_CFG_PSEK_MSK 0x0400
79 #define WAVEFORM2_CFG_PIN_SW_MSK 0x0200
80 #define WAVEFORM2_CFG_RESET_MSK 0x0100
81 #define WAVEFORM2_CFG_SLEEP1_MSK 0x0080
82 #define WAVEFORM2_CFG_SLEEP12_MSK 0x0040
83 #define WAVEFORM2_CFG_OPBITEN_MSK 0x0020
84 #define WAVEFORM2_CFG_SIGN_PIB_MSK 0x0010
85 #define WAVEFORM2_CFG_DIV2_MSK 0x0008
86 #define WAVEFORM2_CFG_MODE_MSK 0x0002
88 #define OUTPUT_TRIANGLE 0x01
89 #define OUTPUT_SINUSOID 0x00
96 #define WAVEFORM2_DEVICE_SLAVE_ADDR_GND 0x50
97 #define WAVEFORM2_DEVICE_SLAVE_ADDR_VCC 0x51
107 #define WAVEFORM2_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
108 #define WAVEFORM2_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
126 #define WAVEFORM2_MAP_MIKROBUS( cfg, mikrobus ) \
127 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
128 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
129 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
130 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
131 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
132 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
133 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
134 cfg.en = MIKROBUS( mikrobus, MIKROBUS_PWM )
468 #endif // WAVEFORM2_H
This file contains SPI specific macros, functions, etc.