RTEMS  5.1
Functions
pwmout.c File Reference

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. More...
 
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.) More...
 
rtems_status_code pwm_pulsewidth (const lpc176x_pin_number pin_number, const lpc176x_microseconds pwidth)
 Sets a pulsewidth for the PWM output. More...
 

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_numberThe 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_numberThe pin whose period we want to change.
periodThe 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_numberThe pin whose pulsewidth we want to change.
pwidthThe desired pulsewidth in microseconds.
Returns
RTEMS_SUCCESSFULL if the pulsewidth's setting was OK, RTEMS_INVALID_NUMBER for a wrong parameter.