MATLAB XPC TARGET 4 - DEVICE DRIVERS Guide de l'utilisateur Page 61

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 111
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 60
Adding Interrupt Support
- PreHookFunction
Prototype:
int __cdecl your_company_name_ boardPreHook(xpcPCIDevice *pciI nfo);
- PostHookFunction
Prototype:
void __cdecl your_compan y_name_boardPostHook(xpcPCIDevice *pciInfo);
- StartFunction
Prototype:
void __cdecl your_compan y_name_boardStart(xpcPCIDevice *pciInfo);
- StopFunction
Prototype:
void __cdecl your_compan y_name_boardStop(xpcPCIDevice *pciInfo);
If any of these four functions does not need to exist, set the corresponding
board structure entry to 'NULL' to prevent calls to that function in that
context.
Note The differences between hook functions fo r PCI and ISA devices are:
- PCI devices A hook function for a PCI dev ice has all fields of the
xpcPCIDevice structure filled in except the VirtAddress field. To get
the virtual address for a physical mem ory, in the
Start function, call
the
xpcReserveMemoryRegion function and save the resulting virtual
address in the
VirtAddress field of the x pcP CIDevice structure. A
pointer to the same instance of this structure is p as sed to all four
functions. This action makes data, such as virtual addresses, available
to all functions.
- ISA devices A hook function for an ISA device has the base I/O
address ente red i n the f irst ph ysical address. No other fields in the
xpcPCIDevice structure are filled in.
5-13
Vue de la page 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 110 111

Commentaires sur ces manuels

Pas de commentaire