03.10.2014 Views

Controller - Institute of Transportation Engineers

Controller - Institute of Transportation Engineers

Controller - Institute of Transportation Engineers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

timer34 = access to MC68360's internal timer #3 & #4 (cascaded)<br />

4.2.7.2.3.2 Timer descriptor option structure<br />

The driver shall change appropriate functions only and ignore values that do not apply to<br />

a particular timer function. The data structures are as follows:<br />

struct TER /* timer event register */<br />

{<br />

u_int16 reserveTER :14; /* reserved */<br />

u_int16 timerREF :1; /* output Reference Event */<br />

u_int16 timerCAP :1; /* Capture event */<br />

};<br />

struct TMR /* timer mode register */<br />

{<br />

unsigned timerPS :8; /* prescale */<br />

unsigned timerCE :2; /* capture edge/enable interrupts */<br />

unsigned timerOM :1; /* output mode */<br />

unsigned timerORI :1; /* output reference enable */<br />

unsigned timerFRR :1; /* free run or restart */<br />

unsigned timerICLK :2; /* input clock source */<br />

unsigned timerGE :1; /* gate enable */<br />

};<br />

struct TGCR /* timer global configuration register */<br />

{<br />

unsigned reserveTGCR :12; /* reserved */<br />

unsigned timerCAS_GM :1; /* cascade timers / Gate mode */<br />

unsigned timerFRZ :1; /* freeze timer */<br />

unsigned timerSTP :1; /* stop timer */<br />

unsigned timerRST :1; /* reset timer */<br />

};<br />

typedef struct<br />

{<br />

union<br />

{<br />

struct TGCR TGCR; /* timer global configuration register */<br />

unsigned short tgcr;<br />

} uTGCR;<br />

union<br />

{<br />

struct TMR TMR; /* timer mode register */<br />

unsigned short tmr;<br />

Standard for the ATC – Type 2070 March 29, 2001<br />

33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!