tl;dr: Current question: Is there a hardware reason the transaction functions for SPI is missing? Or would slight modifications of the Arduino SPISettings and transaction functions be able to solve the problem?
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hi,
So I'm currently working on a project that records voltages from a potentiometer to an SD card. I have this SD card breakout board.
adafruit.com/products/254 and am currently using the Digispark Pro. I followed the instructions in the adafruit tutorial and used the SD examples in the IDE to get a datalogger code written.
The code compiles if the board is set as the Arduino Uno, but not the Digispark Pro. The following error popped up:
In file included from C:\Program Files (x86)\Digistump_Arduino\libraries\SD\src/utility/Sd2Card.h:26:0,
from C:\Program Files (x86)\Digistump_Arduino\libraries\SD\src/utility/SdFat.h:29,
from C:\Program Files (x86)\Digistump_Arduino\libraries\SD\src/SD.h:20,
from sketch_apr04a.ino:2:
C:\Program Files (x86)\Digistump_Arduino\libraries\SD\src/utility/Sd2PinMap.h:300:5: error: 'DDRD' was not declared in this scope
{&DDRD, &PIND, &PORTD, 0}, // D0 0
^
C:\Program Files (x86)\Digistump_Arduino\libraries\SD\src/utility/Sd2PinMap.h:300:12: error: 'PIND' was not declared in this scope
{&DDRD, &PIND, &PORTD, 0}, // D0 0
^
C:\Program Files (x86)\Digistump_Arduino\libraries\SD\src/utility/Sd2PinMap.h:300:19: error: 'PORTD' was not declared in this scope
{&DDRD, &PIND, &PORTD, 0}, // D0 0
^
I went into the Sd2PinMap.h header file and realized it was a list of digital pin maps that didn't include the ATTiny167's pin map, but only the ATmegas. I also couldn't track down where the variables "DDRA," "DDRB," etc. were declared in even an Arduino Uno board. Would someone be able to point me to the right direction in terms of how to fix this error? Or maybe direct me to an easier way to program the SD card to write?