Last modified: Jun 3 1998
The variable writeOutRegisterShadow must be declared in the file frontpanel.cc since it is declared static in the class. There is only one instance of writeOutRegisterShadow which is shared by all instances derived from the class LED.
byte LED::writeOutRegisterShadow = 0x38;
It is possible to explicitly specify the constructor which should be used in C++. If no specification is given, the compiler automatically uses the default constructors in the base classes and all objects in the derived class. The implementation of the constructor in the class FrontPanel should initialise the LED instances according to
FrontPanel::FrontPanel():
Job(),
mySemaphore(Semaphore::createQueueSemaphore("FP",0)),
myNetworkLED(networkLedId),
myCDLED(cdLedId),
myStatusLED(statusLedId)
{
cout << "FrontPanel created." << endl;
Job::schedule(this);
}
There are many reasons for nothing to happen. One possible reason is that you forgot to schedule the thread.
All periodic timers must be explicitly started by the method startPeriodicTimer. Instances of the class Timed only depend on the method timeOutAfter.
The front panel is referenced by the method instance
FrontPanel::instance().notifyLedEvent(FrontPanel::cdLedId);
*(volatile byte*)0x80000000 = 0x08;
The purpose of the reserved word volatile is to force an implementation to suppress optimization that could otherwise occur. For example, for a machine with memory-mapped input/output, a pointer to a device register might be declared as a pointer to volatile, in order to prevent the compiler from removing apparently redundant references through the pointer.