Comet Labs 48-Port 10 Betriebsanweisung Seite 104

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 132
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 103
CIF Peripheral Model - SimpleTimer
100 CoMET Version 5.9 – Tutorial
The default output section appears as follows:
/*
** Output handles
*/
/*
const tAmpiLogicHandleMaster *OutputName;
*/
Replace the commented-out line
const tAmpiLogicHandleMaster *OutputName;
with the following:
CODE BEGINS
const tAmpiLogicHandleMaster *MatchInterrupt[NUM_MATCH_REGISTERS];
CODE ENDS
The default input handles section appears as follows:
/*
** Input handles.
*/
const tAmpiLogicHandleSlave *Reset;
const tAmpiClockHandleSlave *BusClock;
const tAmpiStdBusHandleSlave *Bus;
Add the TimerClock input port handle declaration after the line
const tAmpiStdBusHandleSlave *Bus;
as follows:
CODE BEGINS
const tAmpiClockHandleSlave *TimerClock;
CODE ENDS
Declaring Instance Data Registers
Registers are stored in the instance data structure as C variables of an appropriate type.
The default registers section looks similar to the following:
/*
** Registers Declarations
*/
tWord32 ReturnData;
Add the following register declarations after the line
tWord32 ReturnData;
CODE BEGINS
tWord32 regGTR; // General Timer Register
tWord32 regTER; //Timer Enable Register
tWord32 regTIER; //Timer Interrupt Enable Register
tWord32 regTIFR; //Timer Interrupt Flag Register
tWord32 regMTR[NUM_MATCH_REGISTERS]; // Match Timer Registers
Seitenansicht 103
1 2 ... 99 100 101 102 103 104 105 106 107 108 109 ... 131 132

Kommentare zu diesen Handbüchern

Keine Kommentare