RTEMS: bsps/arm/lpc176x/pwm/pwmout.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
pwmout.c File Reference
Board Support Packages » ARM » NXP LPC176X

PWM-Out controller for the mbed lpc1768 board. More...

`#include <rtems/status-checks.h>`
`#include <bsp/pwmout.h>`
`#include <bsp/pwmout-defs.h>`

## Functions
rtems_status_code | pwm_init (const lpc176x_pin_number pin_number)
| Initializes the PWM output device and sets an initial period of 20000us.
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.)
rtems_status_code | pwm_pulsewidth (const lpc176x_pin_number pin_number, const lpc176x_microseconds pwidth)
| Sets a pulsewidth for the PWM output.

## Detailed Description

PWM-Out controller for the mbed lpc1768 board.

## Function Documentation

## ◆ 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.

Parameters

  pin_number | The PWM output pin.

Returns
  RTEMS_SUCCESSFULL if the PWM initialization was OK, RTEMS_INVALID_NUMBER for a wrong parameter.

## ◆ 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.)

Parameters

  pin_number | The pin whose period we want to change.
  period | The desired period in microseconds.

Returns
  RTEMS_SUCCESSFULL if the period's setting was OK, RTEMS_INVALID_NUMBER for a bad parameter.

## ◆ pwm_pulsewidth()

rtems_status_code pwm_pulsewidth | ( | const lpc176x_pin_number | pin_number,
|  | const lpc176x_microseconds | pwidth
| ) |  |

Sets a pulsewidth for the PWM output.

Parameters

  pin_number | The pin whose pulsewidth we want to change.
  pwidth | The desired pulsewidth in microseconds.

Returns
  RTEMS_SUCCESSFULL if the pulsewidth's setting was OK, RTEMS_INVALID_NUMBER for a wrong parameter.