Proposal: Changing SD card lib pins

May someone change / adjust the pin in the SD lib files distributed with the IDE. In 1.0.4 you find under

arduino-1.0.4/libraries/SD/examples/Files/Files.ino

  pinMode(10, OUTPUT);

  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }

In the comment on the beginning of the file you can read "CS - pin 4" but in the code is in the pinMode sektion pin 10 defined and then pin 4 in the initialization. So one must be wrong.

Better would be to make a variable--as in the other example files--and define it only once as parameter.

In most files you can read

// On the Ethernet Shield, CS is pin 4. Note that even if it's not
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
// 53 on the Mega) must be left as an output or the SD library
// functions will not work.

So if pin 10 is CS on the most board it should be the default pin in the example files not pin 4.

The pins for the SPI interface, for that is what an SD card is, are fixed by the hardware of the processor. While you can use any other pin for a chip enable to the device you must use pin 10 as well as the other three pins. It is just the way the processor is made.

Ups, did I missed something? I'm using the GBoard http://imall.iteadstudio.com/im120411004.html, an Arduino clone with integrated GSM, other radio and also SD slot, driven by a ATMega328P. They recommend the Tiny FAT Lib, but the SD card is also working with the standard SD lib in IDE 1.0.4. Only one thing I had to change:

// On the Ethernet Shield, CS is pin 4. Note that even if it's not
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
// 53 on the Mega) must be left as an output or the SD library
// functions will not work.
const int chipSelect = 4;

I had to change--as "predicted" in the comment--chipSelect from 4 to 10 so

const int chipSelect = 10;

worked for me. In the same sketch, e.g. Datalogger.ino there is a section

  // make sure that the default chip select pin is set to
  // output, even if you don't use it:
  pinMode(10, OUTPUT);

So I thought this must be a mistake, because above 4 is assigned to var "chipSelect" and then "chip select pin is set to output" but now it is 10 in the same sketch. This is the case in many example sketches. In File.ino there is
SD.begin(cspin) in line 40 "SD.begin(4)" but tow lines above "pinMode(10, OUTPUT);"

Ok, I thing I got it. There are pins and "hardware pins"

  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin 
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output 
  // or the SD library functions will not work.

But is it then right--in my case--to define pin 10 as chipSelect

const int chipSelect = 10;

There is not much information on the datasheet of the GBoard.