Move module and driver initialisation code into separate function.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@65 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent 137136833f
commit 215a3deaf2

@ -88,12 +88,13 @@ void configureSPI() {
}
void setup () {
Serial.begin(9600);
Serial.println("Setup enter...");
configureSPI();
void initModule() {
/*
Initialise the WIZ810MJ module and driver.
*/
// I thought this wasn't needed but seems like it is.
Serial.println("Triggering reset...");
pinMode(PIN_RESET, OUTPUT);
@ -114,7 +115,16 @@ void setup () {
// driver sysinit
Serial.println("Call sysinit...");
sysinit(0x55, 0x55);
}
void setup () {
Serial.begin(9600);
Serial.println("Setup enter...");
configureSPI();
initModule();
Serial.println("Test W5100 configuration...");

Loading…
Cancel
Save