RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Functions
pwmout.h File Reference

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

#include <bsp.h>
#include <bsp/io.h>
#include <bsp/lpc176x.h>

Go to the source code of this file.

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_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.