RTEMS  5.1
timer.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright (c) 2014 Taller Technologies.
11  *
12  * @author Boretto Martin (martin.boretto@tallertechnologies.com)
13  * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
14  * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com)
15  * @author Daniel Chicco (daniel.chicco@tallertechnologies.com)
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #ifndef LIBBSP_ARM_LPC176X_TIMER_H
23 #define LIBBSP_ARM_LPC176X_TIMER_H
24 
25 #include <bsp/timer-defs.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30 
38 
48  lpc176x_timer_number tnumber,
50 );
51 
59 
68  lpc176x_timer_number tnumber,
69  bool *is_started
70 );
71 
81  lpc176x_timer_number tnumber,
82  lpc176x_microseconds resolution
83 );
84 
96  lpc176x_timer_number tnumber,
97  lpc176x_match_port match_port,
98  lpc176x_match_function function,
99  uint32_t match_value
100 );
101 
111  lpc176x_timer_number tnumber,
112  lpc176x_capture_port capture_port,
113  lpc176x_capture_function function
114 );
115 
124  lpc176x_timer_number tnumber,
125  lpc176x_match_port match_port,
127 );
128 
137  lpc176x_timer_number tnumber,
138  lpc176x_capture_port capnumber
139 );
140 
148 
156  lpc176x_timer_number tnumber,
157  uint32_t lpc176x_timer_value
158 );
159 
166 
176 
187  lpc176x_timer_number tnumber,
188  const lpc176x_isr_funct_vector *vector
189 );
190 
191 #ifdef __cplusplus
192 }
193 #endif /* __cplusplus */
194 
195 #endif /* LIBBSP_ARM_LPC176X_TIMER_H */
lpc176x_timer_mode
Timer modes of a timer.
Definition: timer-defs.h:318
rtems_status_code lpc176x_timer_set_timer_value(lpc176x_timer_number tnumber, uint32_t lpc176x_timer_value)
Sets the timer value.
Definition: timer.c:317
rtems_status_code lpc176x_timer_is_started(lpc176x_timer_number tnumber, bool *is_started)
true if timer is started.
Definition: timer.c:186
uint32_t lpc176x_timer_get_timer_value(lpc176x_timer_number tnumber)
Gets the timer value.
Definition: timer.c:309
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 o...
Definition: timer.c:383
lpc176x_timer_number
The timer devices in the board.
Definition: timer-defs.h:333
API definitions of the for the timer of the lpc176x bsp.
lpc176x_match_port
Match ports of a timer.
Definition: timer-defs.h:305
lpc176x_ext_match_function
The possible functions at match, for the external ports.
Definition: timer-defs.h:391
uint32_t lpc176x_timer_get_capvalue(lpc176x_timer_number tnumber, lpc176x_capture_port capnumber)
Gets the captured value.
Definition: timer.c:298
void lpc176x_timer_isr(void *lpc176x_timer_number)
Timer generic isroutine.
Definition: timer.c:335
rtems_status_code lpc176x_timer_capture_config(lpc176x_timer_number tnumber, lpc176x_capture_port capture_port, lpc176x_capture_function function)
Configures the capture ports.
Definition: timer.c:250
lpc176x_match_function
The possible functions at match. This options could be used together.
Definition: timer-defs.h:364
rtems_status_code
Classic API Status.
Definition: status.h:43
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.
Definition: timer.c:274
uint32_t lpc176x_microseconds
Microseconds representation.
Definition: common-types.h:37
lpc176x_isr_funct const lpc176x_isr_funct_vector[LPC176X_ISR_FUNCTIONS_COUNT]
The vector of functions that attends each possible interrupt source for a timer.
Definition: timer-defs.h:411
rtems_status_code lpc176x_timer_reset(lpc176x_timer_number tnumber)
resets timer counter and stops it.
Definition: timer.c:136
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)
Definition: timer.c:152
lpc176x_capture_port
Capture ports of a timer.
Definition: timer-defs.h:294
rtems_status_code lpc176x_timer_set_resolution(lpc176x_timer_number tnumber, lpc176x_microseconds resolution)
sets the resolution in microseconds of the timer
Definition: timer.c:205
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.
Definition: timer.c:225
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 o...
Definition: timer.c:357
rtems_status_code lpc176x_timer_start(lpc176x_timer_number tnumber)
Starts the timer counter.
Definition: timer.c:170
lpc176x_capture_function
The possible functions at capture. This options could be used together.
Definition: timer-defs.h:378