![]() |
RTEMS 6.1
|
Timer API for the lpc176x bsp. More...
#include <bsp/timer-defs.h>Go to the source code of this file.
Functions | |
| rtems_status_code | lpc176x_timer_reset (lpc176x_timer_number tnumber) |
| resets timer counter and stops it. | |
| rtems_status_code | lpc176x_timer_set_mode (lpc176x_timer_number tnumber, lpc176x_timer_mode mode) |
| Sets mode of the timer (timer, counter rising, counter falling or counter both edges) | |
| rtems_status_code | lpc176x_timer_start (lpc176x_timer_number tnumber) |
| Starts the timer counter. | |
| rtems_status_code | lpc176x_timer_is_started (lpc176x_timer_number tnumber, bool *is_started) |
| true if timer is started. | |
| rtems_status_code | lpc176x_timer_set_resolution (lpc176x_timer_number tnumber, lpc176x_microseconds resolution) |
| sets the resolution in microseconds of the timer | |
| rtems_status_code | lpc176x_timer_match_config (lpc176x_timer_number tnumber, lpc176x_match_port match_port, lpc176x_match_function function, uint32_t match_value) |
| Configures the timer match. | |
| rtems_status_code | lpc176x_timer_capture_config (lpc176x_timer_number tnumber, lpc176x_capture_port capture_port, lpc176x_capture_function function) |
| Configures the capture ports. | |
| rtems_status_code | lpc176x_timer_external_match_config (lpc176x_timer_number tnumber, lpc176x_match_port match_port, lpc176x_ext_match_function function) |
| Configures the external match ports. | |
| uint32_t | lpc176x_timer_get_capvalue (lpc176x_timer_number tnumber, lpc176x_capture_port capnumber) |
| Gets the captured value. | |
| uint32_t | lpc176x_timer_get_timer_value (lpc176x_timer_number tnumber) |
| Gets the timer value. | |
| rtems_status_code | lpc176x_timer_set_timer_value (lpc176x_timer_number tnumber, uint32_t lpc176x_timer_value) |
| Sets the timer value. | |
| void | lpc176x_timer_isr (void *lpc176x_timer_number) |
| Timer generic isroutine. | |
| rtems_status_code | lpc176x_timer_init (lpc176x_timer_number tnumber) |
| Initializes timer in timer mode and resets counter but without starting it, and without any capture or match function. | |
| rtems_status_code | lpc176x_timer_init_with_interrupt (lpc176x_timer_number tnumber, const lpc176x_isr_funct_vector *vector) |
| Initializes timer in timer mode and resets counter but without starting it, and without any capture or match function. | |
Timer API for the lpc176x bsp.
|
inline |
Configures the capture ports.
| tnumber | the device to be modified |
| capture_port | which port of this timer will be setted |
| function | At which edge/s will the capture work, and if it will interrupt |
|
inline |
Configures the external match ports.
| tnumber | the device to be modified |
| match_port | which match for this timer |
| function | what should do when match: set, clear toggle or nothing |
|
inline |
Gets the captured value.
| tnumber | the device to be modified |
| capnumber | which capture port for this timer |
|
inline |
Gets the timer value.
| tnumber | the device |
| rtems_status_code lpc176x_timer_init | ( | lpc176x_timer_number | tnumber | ) |
Initializes timer in timer mode and resets counter but without starting it, and without any capture or match function.
| tnumber | which timer |
| rtems_status_code lpc176x_timer_init_with_interrupt | ( | lpc176x_timer_number | tnumber, |
| const lpc176x_isr_funct_vector * | vector | ||
| ) |
Initializes timer in timer mode and resets counter but without starting it, and without any capture or match function.
| tnumber | which timer to init |
| vector | the functions to be used by the isr. |
|
inline |
true if timer is started.
| tnumber | the timer number to check. |
| is_started | TRUE if the timer is running. |
| void lpc176x_timer_isr | ( | void * | lpc176x_timer_number | ) |
Timer generic isroutine.
| timernumber | the number of timer. |
| rtems_status_code lpc176x_timer_match_config | ( | lpc176x_timer_number | tnumber, |
| lpc176x_match_port | match_port, | ||
| lpc176x_match_function | function, | ||
| uint32_t | match_value | ||
| ) |
Configures the timer match.
| tnumber | the device to be modified |
| match_port | which port of this timer will be setted |
| function | what the timer should do when match: stop timer, clear, and/or interrupt |
| match_value | the value that the timer should match. |
|
inline |
resets timer counter and stops it.
| tnumber | the device to be reseted |
|
inline |
Sets mode of the timer (timer, counter rising, counter falling or counter both edges)
| tnumber | the device to be setted |
| mode | the desired mode |
|
inline |
sets the resolution in microseconds of the timer
| tnumber | the device to be modified. |
| resolution | how many microseconds will mean each timer counter unit. |
|
inline |
Sets the timer value.
| tnumber | the timer to modify. |
| timer_value | the value to set. |
|
inline |
Starts the timer counter.
| tnumber | the device to be started |