RAM 6.0 BUX II Series Betriebsanweisung Seite 45

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 189
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 44
2 Overview of a BSP
2.3 Components of a BSP
37
2
supported, this routine returns a pointer to a statically allocated structure. The
following is a sample for a generic BSP supporting exactly two serial devices:
LOCAL SIO_CHAN boardSccChan1;
LOCAL SIO_CHAN boardSccChan2;
/****************************************************************************
*
* sysSerialChanGet - get the SIO_CHAN device associated with a serial channel
*
* This routine gets the SIO_CHAN device associated with a specified serial
* channel.
*
* RETURNS: A pointer to the SIO_CHAN structure for the channel, or ERROR
* if the channel is invalid.
*/
SIO_CHAN * sysSerialChanGet
(
int channel /* serial channel */
)
{
if (channel == 0)
return ((SIO_CHAN *) &boardSccChan1);
else if (channel == 1)
return ((SIO_CHAN *) &boardSccChan2);
else
return ((SIO_CHAN *) ERROR);
}
sysToMonitor( )
The sysToMonitor( ) routine in sysLib.c is called to reboot the system when ctrl+X
is pressed on the console keyboard or, on some systems, when certain processor
errors occur at interrupt level. When sysToMonitor( ) hands control over to the
boot monitor, the system must be set to a state where no interrupts occur; failure
to do this causes the reboot to fail. The following template can be used as a starting
point. However, the
TO BE DONE sections must be replaced by code that performs
the stated operations.
/****************************************************************************
*
* sysToMonitor - transfer control to the ROM monitor
*
* This routine transfers control to the ROM monitor. Normally, it is called
* only by reboot()--which services ^X--and bus errors at interrupt level.
* However, in some circumstances, the user may wish to introduce a
* <startType> to enable special boot ROM facilities.
*
* RETURNS: Does not return.
*/
Seitenansicht 44
1 2 ... 40 41 42 43 44 45 46 47 48 49 50 ... 188 189

Kommentare zu diesen Handbüchern

Keine Kommentare