Change SPI configuration to use an object so we can match the 'Foo.begin()' convention of the standard Arduino Serial configuration people are used to seeing.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@88 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent 11ab05e210
commit 5f2b65048d

@ -47,13 +47,13 @@
#define PIN_SPI_CLOCK 13 // SCK (Serial Clock)
#define PIN_SLAVE_SELECT 10 // SS (Slave Select)
class SPI {
class SpiConfiguration {
public:
static void begin(void);
};
void SPI::begin(void) {
void SpiConfiguration::begin(void) {
/*
Configure pins and registers required for SPI communication.
@ -91,6 +91,8 @@ void SPI::begin(void) {
}
SpiConfiguration SPI = SpiConfiguration();
/* ----------------------- */
// #define PIN_RESET 9 // WIZnet module /RESET
@ -143,7 +145,7 @@ void setup () {
Serial.begin(9600);
Serial.println("Setup enter...");
SPI::begin();
SPI.begin();
initModule();

Loading…
Cancel
Save