AMX 68000 Bedienungsanleitung Seite 23

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 90
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 22
AMX 68000 Target Guide
K
A
DAK
17
The following examples illustrate how simple an Interrupt Handler can be.
/* The ISP root definition in the Target Parameter File is as follows:*/
/* ...ISPC deviceisp,deviceih,26,0,0 */
/* The ISP root is given the public name deviceisp */
/* The Interrupt Handler is named deviceih */
/* The device interrupts on vector number 26 (level 2) */
void CJ_CCPP deviceih(void)
{
local variables, if required
:
Clear the source of the interrupt request.
Perform all device service.
:
}
/* Assume dcbinfo is some application device control block structure. */
/* Assume deviceXdcb is a structure variable defined as */
/* "struct dcbinfo deviceXdcb;". */
/* */
/* The ISP root definition in the Target Parameter File is as follows:*/
/* ...ISPC dcb_isp,dcb_ih,30,deviceXdcb,1 */
/* The ISP root is given the public name dcb_isp */
/* The Interrupt Handler is named dcb_ih */
/* The device interrupts on vector number 30 (level 6) */
/* deviceXdcb is the name of the public structure variable which */
/* contains information about the specific device. */
void CJ_CCPP dcb_ih(struct dcbinfo *dcbp)
{
local variables, if required
:
Use device control block pointer dcbp to access structure variable
deviceXdcb to determine device addresses.
Clear the source of the interrupt request.
Perform all device service.
:
}
Seitenansicht 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 89 90

Kommentare zu diesen Handbüchern

Keine Kommentare