this looks like the thread I need as I came from http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/8 with the same errors you guys are reporting. tried to implement your changes
defined(__AVR_ATmega168__)
#define configure_pin_mosi() DDRB |= (1 << DDB3)
#define configure_pin_sck() DDRB |= (1 << DDB5)
#define configure_pin_ss() DDRB |= (1 << DDB2)
#define configure_pin_miso() DDRB &= ~(1 << DDB4)
#define select_card() PORTB &= ~(1 << PB2)
#define unselect_card() PORTB |= (1 << PB2)
#elif defined(__AVR_ATmega328P__)
#define configure_pin_mosi() DDRB |= (1 << DDB3)
#define configure_pin_sck() DDRB |= (1 << DDB5)
#define configure_pin_ss() DDRB |= (1 << DDB2)
#define configure_pin_miso() DDRB &= ~(1 << DDB4)
#define select_card() PORTB &= ~(1 << PORTB2)
#define unselect_card() PORTB |= (1 << PORTB2)
and
#define configure_pin_available() //DDRC &= ~(1 << DDC4)
#define configure_pin_locked() //DDRC &= ~(1 << DDC5)
#define get_pin_available() 0 //((PINC >> PC4) & 0x01)
#define get_pin_locked() 0 //((PINC >> PC5) & 0x01)
but I get
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:13: error: 'byte' does not name a type
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:16: error: 'byte' does not name a type
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp: In function 'void setup()':
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:22: error: 'Serial' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:23: error: 'delay' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp: In function 'void loop()':
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:39: error: 'Serial' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:41: error: 'incomingByte' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp: In function 'int sample()':
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:61: error: 'byte' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:61: error: expected `;' before 'low'
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:62: error: expected `;' before 'high'
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:63: error: expected `;' before 'inByte'
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:65: error: 'Serial' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:72: error: 'inByte' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:75: error: 'analogRead' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:76: error: 'DEC' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:80: error: 'low' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:81: error: 'high' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:86: error: 'tempBytes' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:94: error: 'delay' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp: In function 'int readDisk()':
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:106: error: 'byte' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:106: error: expected `;' before 'low'
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:107: error: expected `;' before 'high'
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:108: error: expected `;' before 'info'
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:111: error: 'Serial' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:114: error: 'info' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:119: error: 'low' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:120: error: 'high' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:124: error: 'DEC' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp: In function 'void printWelcome()':
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:132: error: 'Serial' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp: In function 'int print_disk_info()':
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:153: error: 'Serial' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:155: error: 'HEX' was not declared in this scope
/home/sirus/arduino/hardware/libraries/SDcard/arduino sd card example.cpp:161: error: 'DEC' was not declared in this scope
any ideas?
how about if anyone has the library with modifications that I can download so I know I didn't mess up what I was supposed to patch?
Thanks a bunch