Adafruit WaveHC Arduino Library
WavePinDefs.h
Go to the documentation of this file.
1 
5 #include <ArduinoPins.h>
6 #ifndef WavePinDefs_h
7 #define WavePinDefs_h
8 
9 // SPI pin definitions
10 
14 #define SS SS_PIN
15 
17 #define MOSI MOSI_PIN
18 
20 #define MISO MISO_PIN
21 
23 #define SCK SCK_PIN
24 
25 //------------------------------------------------------------------------------
26 // DAC pin definitions
27 
28 // LDAC may be connected to ground to save a pin
30 #define USE_MCP_DAC_LDAC 1
31 
32 // use arduino pins 2, 3, 4, 5 for DAC
33 
34 // pin 2 is DAC chip select
35 
37 #define MCP_DAC_CS_DDR PIN2_DDRREG
38 
39 #define MCP_DAC_CS_PORT PIN2_PORTREG
40 
41 #define MCP_DAC_CS_BIT PIN2_BITNUM
42 
43 // pin 3 is DAC serial clock
45 #define MCP_DAC_SCK_DDR PIN3_DDRREG
46 
47 #define MCP_DAC_SCK_PORT PIN3_PORTREG
48 
49 #define MCP_DAC_SCK_BIT PIN3_BITNUM
50 
51 // pin 4 is DAC serial data in
52 
54 #define MCP_DAC_SDI_DDR PIN4_DDRREG
55 
56 #define MCP_DAC_SDI_PORT PIN4_PORTREG
57 
58 #define MCP_DAC_SDI_BIT PIN4_BITNUM
59 
60 // pin 5 is LDAC if used
61 #if USE_MCP_DAC_LDAC
62 
63 #define MCP_DAC_LDAC_DDR PIN5_DDRREG
64 
65 #define MCP_DAC_LDAC_PORT PIN5_PORTREG
66 
67 #define MCP_DAC_LDAC_BIT PIN5_BITNUM
68 #endif // USE_MCP_DAC_LDAC
69 
70 #endif // WavePinDefs_h