|
|
|
@ -95,25 +95,31 @@ void initModule() {
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// I thought this wasn't needed but seems like it is.
|
|
|
|
|
Serial.println("Triggering reset...");
|
|
|
|
|
/*
|
|
|
|
|
Initialise the W5100 chip
|
|
|
|
|
|
|
|
|
|
(Originally I thought it was possible for the chip
|
|
|
|
|
to function without a hardware reset but it
|
|
|
|
|
seems not to be the case.)
|
|
|
|
|
*/
|
|
|
|
|
pinMode(PIN_RESET, OUTPUT);
|
|
|
|
|
|
|
|
|
|
digitalWrite(PIN_RESET, HIGH); // no reset
|
|
|
|
|
//delay(10); // Pretty arbitrary length -- do we need it?
|
|
|
|
|
// We rely on the time between function calls to
|
|
|
|
|
// be long enough for the chip to recognise the
|
|
|
|
|
// reset.
|
|
|
|
|
digitalWrite(PIN_RESET, HIGH);
|
|
|
|
|
digitalWrite(PIN_RESET, LOW); // reset
|
|
|
|
|
//delay(10);
|
|
|
|
|
digitalWrite(PIN_RESET, HIGH); // no reset
|
|
|
|
|
//delay(10);
|
|
|
|
|
Serial.println("Reset triggered...");
|
|
|
|
|
|
|
|
|
|
digitalWrite(PIN_RESET, HIGH);
|
|
|
|
|
|
|
|
|
|
// driver chip init (Might be redundant with the above reset.)
|
|
|
|
|
Serial.println("Call iinchip_init...");
|
|
|
|
|
// Chip initialisation by driver
|
|
|
|
|
// Might be redundant following the above reset,
|
|
|
|
|
// as this performs a software reset.
|
|
|
|
|
iinchip_init();
|
|
|
|
|
|
|
|
|
|
// driver sysinit
|
|
|
|
|
Serial.println("Call sysinit...");
|
|
|
|
|
// Initialise driver
|
|
|
|
|
// (This is required to configure some variables used
|
|
|
|
|
// internally by the driver--even if the default chip
|
|
|
|
|
// configuration is used.)
|
|
|
|
|
sysinit(0x55, 0x55);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|