|
#define | CMD_xpci3xxx_InitTimer _IOR(xpci3xxx_MAGIC, 80,long) |
| Initialize the timer. More...
|
|
#define | CMD_xpci3xxx_ReleaseTimer _IOR(xpci3xxx_MAGIC, 81,long) |
| Stop and free the timer. More...
|
|
#define | CMD_xpci3xxx_StartTimer _IOR(xpci3xxx_MAGIC, 82,long) |
| Start selected timer. More...
|
|
#define | CMD_xpci3xxx_StartAllTimers _IOR(xpci3xxx_MAGIC, 83,long) |
| Start all already initialized timers. More...
|
|
#define | CMD_xpci3xxx_TriggerTimer _IOR(xpci3xxx_MAGIC, 84,long) |
| Triggers the selected timer. More...
|
|
#define | CMD_xpci3xxx_TriggerAllTimers _IOR(xpci3xxx_MAGIC, 85,long) |
| Triggers all initialized timers. More...
|
|
#define | CMD_xpci3xxx_StopTimer _IOR(xpci3xxx_MAGIC, 86,long) |
| Stop the selected timer. More...
|
|
#define | CMD_xpci3xxx_StopAllTimers _IOR(xpci3xxx_MAGIC, 87,long) |
| Stop all started timers. More...
|
|
#define | CMD_xpci3xxx_ReadTimerValue _IOR(xpci3xxx_MAGIC, 88,long) |
| Read the timer value. More...
|
|
#define | CMD_xpci3xxx_ReadTimerStatus _IOR(xpci3xxx_MAGIC, 89,long) |
| Returns the timer status. More...
|
|
#define | CMD_xpci3xxx_EnableDisableTimerInterrupt _IOR(xpci3xxx_MAGIC, 90,long) |
| Enable/disable the timer interrupt. More...
|
|
#define | CMD_xpci3xxx_EnableDisableTimerHardwareOutput _IOR(xpci3xxx_MAGIC, 91,long) |
| Enable/disable the hardware timer output. More...
|
|
#define | CMD_xpci3xxx_GetTimerHardwareOutputStatus _IOR(xpci3xxx_MAGIC, 92,long) |
| Returns the status of the output of the hardware timer. More...
|
|
#define CMD_xpci3xxx_InitTimer _IOR(xpci3xxx_MAGIC, 80,long) |
Initialize the timer.
- Parameters
-
[in] | uint32_t | arg[4] Parameters |
- arg[0] Timer number
- arg[1] Timer mode (see below)
- arg[2] Timer Time Unit : Timer unit
- 0 : nanoseconds
- 1 : microseconds
- 2 : milliseconds
- 3 : seconds
- arg[3] Start value or time interval (depending of the board)
- Return values
-
0 | : Success |
1 | : Internal error |
2 | : Wrong Timer number |
3 | : Timer already used as counter |
4 | : Timer already used as watchdog |
5 | : Wrong Timer mode |
6 | : Wrong Timer time unit |
7 | : Wrong reload value |
Timer mode description
Selected Mode description dw_ReloadValue Hardware gate
mode description input action
0 Mode 0 is typically used for event counting. After Start counting Hardware gate
the initialization, OUT is initially low, and remains value
low until the counter reaches 0. OUT goes high and
remains high until a new count is written.
1 Mode 1 is similar to mode 0 except for the gate Start counting Hardware
input action. value trigger
The gate input is not used to enable or disable the
timer (like in Mode 0), but to trigger it.
2 This mode functions like a divide-by- Divider factor Hardware gate
ul_ReloadValue counter. It is used to generate a real
time clock interrupt. OUT is initially high after the
initialization. When the initial count has
decremented to 1, OUT goes low for one CLK pulse.
OUT then goes high again, the counter reloads the
initial count (ul_ReloadValue) and the process is
repeated. This action can generate an interrupt.
3 Mode 3 is typically used for baud rate generation. Divider factor Hardware gate
This mode is similar to mode 2 except for the duty
cycle of OUT. OUT will initially be high after the
initialization. When the initial count
(ul_ReloadValue) has expired, OUT goes low for
the next sequence.then the initial count (ul_ReloadValue)
of that sequence has expired, OUT goes high again for
the following sequence.
The mode is periodic;
the sequence above is repeated indefinitely.
4 OUT is initially high after the initialization. When Start counting Hardware gate
the initial count expires, OUT will go low for one value
CLK pulse and then go high again. The counting
sequence is triggered by writing a new value. If a
new count is written during counting, it will be
loaded on the next CLK pulse.
5 Mode 5 is similar to mode 4 except for the gate input Start counting Hardware
action. value trigger
The gate input is not used to enable or disable the
timer, but to trigger it.
Definition at line 1159 of file xpci3xxx.h.