RTEMS 7.0-rc1
Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
2
11/*
12 * Copyright (c) 2014 Taller Technologies.
13 *
14 * @author Boretto Martin (martin.boretto@tallertechnologies.com)
15 * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
16 * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com)
17 * @author Daniel Chicco (daniel.chicco@tallertechnologies.com)
18 *
19 * The license and distribution terms for this file may be
20 * found in the file LICENSE in this distribution or at
21 * http://www.rtems.org/license/LICENSE.
22 */
23
24#ifndef LIBBSP_ARM_LPC176X_TIMER_H
25#define LIBBSP_ARM_LPC176X_TIMER_H
26
27#include <bsp/timer-defs.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
40
52);
53
61
71 bool *is_started
72);
73
84 lpc176x_microseconds resolution
85);
86
99 lpc176x_match_port match_port,
100 lpc176x_match_function function,
101 uint32_t match_value
102);
103
113 lpc176x_timer_number tnumber,
114 lpc176x_capture_port capture_port,
116);
117
126 lpc176x_timer_number tnumber,
127 lpc176x_match_port match_port,
129);
130
139 lpc176x_timer_number tnumber,
140 lpc176x_capture_port capnumber
141);
142
150
158 lpc176x_timer_number tnumber,
159 uint32_t lpc176x_timer_value
160);
161
168
178
189 lpc176x_timer_number tnumber,
190 const lpc176x_isr_funct_vector *vector
191);
192
193#ifdef __cplusplus
194}
195#endif /* __cplusplus */
196
197#endif /* LIBBSP_ARM_LPC176X_TIMER_H */
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:227
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:154
rtems_status_code lpc176x_timer_start(lpc176x_timer_number tnumber)
Starts the timer counter.
Definition: timer.c:172
void lpc176x_timer_isr(void *lpc176x_timer_number)
Timer generic isroutine.
Definition: timer.c:337
rtems_status_code lpc176x_timer_is_started(lpc176x_timer_number tnumber, bool *is_started)
true if timer is started.
Definition: timer.c:188
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:252
uint32_t lpc176x_timer_get_timer_value(lpc176x_timer_number tnumber)
Gets the timer value.
Definition: timer.c:311
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:207
rtems_status_code lpc176x_timer_set_timer_value(lpc176x_timer_number tnumber, uint32_t lpc176x_timer_value)
Sets the timer value.
Definition: timer.c:319
uint32_t lpc176x_timer_get_capvalue(lpc176x_timer_number tnumber, lpc176x_capture_port capnumber)
Gets the captured value.
Definition: timer.c:300
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:276
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:385
rtems_status_code lpc176x_timer_reset(lpc176x_timer_number tnumber)
resets timer counter and stops it.
Definition: timer.c:138
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:359
uint32_t lpc176x_microseconds
Microseconds representation.
Definition: common-types.h:39
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
API definitions of the for the timer of the lpc176x bsp.
lpc176x_ext_match_function
The possible functions at match, for the external ports.
Definition: timer-defs.h:393
lpc176x_timer_number
The timer devices in the board.
Definition: timer-defs.h:335
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:413
lpc176x_match_port
Match ports of a timer.
Definition: timer-defs.h:307
lpc176x_match_function
The possible functions at match. This options could be used together.
Definition: timer-defs.h:366
lpc176x_capture_function
The possible functions at capture. This options could be used together.
Definition: timer-defs.h:380
lpc176x_timer_mode
Timer modes of a timer.
Definition: timer-defs.h:320
lpc176x_capture_port
Capture ports of a timer.
Definition: timer-defs.h:296