From 2a5e2e31c6f85f9fe76358cb7f377d51702b7879 Mon Sep 17 00:00:00 2001 From: follower Date: Mon, 5 Nov 2007 11:47:32 +0000 Subject: [PATCH] Add comments to initialisation code. Remove debug prints. Remove some (probably) unnecessary comments. git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@66 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b --- .../wiz810mj/src/demo/WizDemo1/WizDemo1.pde | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/branches/follower/wiz810mj/src/demo/WizDemo1/WizDemo1.pde b/branches/follower/wiz810mj/src/demo/WizDemo1/WizDemo1.pde index 9a16712..69714d3 100644 --- a/branches/follower/wiz810mj/src/demo/WizDemo1/WizDemo1.pde +++ b/branches/follower/wiz810mj/src/demo/WizDemo1/WizDemo1.pde @@ -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); }