RTEMS: bsps/arm/lpc176x/include/bsp/pwmout.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
pwmout.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2014 Taller Technologies.
11 *
12 * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
13 *
14 * The license and distribution terms for this file may be
15 * found in the file LICENSE in this distribution or at
16 * http://www.rtems.org/license/LICENSE.
17 */
18
19#ifndef LPC176X_PWMOUT_H
20#define LPC176X_PWMOUT_H
21
22#include <bsp.h>
23#include <bsp/io.h>
24#include <bsp/lpc176x.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif /* __cplusplus */
29
38 rtems_status_code pwm_init( const lpc176x_pin_number pin_number );
39
50 rtems_status_code pwm_period(
51 const lpc176x_pin_number pin_number,
52 const lpc176x_microseconds period
53);
54
64 rtems_status_code pwm_pulsewidth(
65 const lpc176x_pin_number pin_number,
66 const lpc176x_microseconds pwidth
67);
68
69#ifdef __cplusplus
70}
71#endif /* __cplusplus */
72
73#endif
lpc176x_microseconds
uint32_t lpc176x_microseconds
Microseconds representation.
Definition: common-types.h:37
lpc176x_pin_number
uint32_t lpc176x_pin_number
A pin of the board.
Definition: common-types.h:32
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
lpc176x.h
Specific register definitions according to lpc176x family boards.
pwm_period
rtems_status_code pwm_period(const lpc176x_pin_number pin_number, const lpc176x_microseconds period)
Sets a period for the PWM output. (Note that this changes the period for all the PWM outputs....
Definition: pwmout.c:178
pwm_init
rtems_status_code pwm_init(const lpc176x_pin_number pin_number)
Initializes the PWM output device and sets an initial period of 20000us.
Definition: pwmout.c:153
pwm_pulsewidth
rtems_status_code pwm_pulsewidth(const lpc176x_pin_number pin_number, const lpc176x_microseconds pwidth)
Sets a pulsewidth for the PWM output.
Definition: pwmout.c:196