SDK4.0
This document shows Ameba SDK 4.0 APIs
pwmout_api.h File Reference

This file provides mbed pwm API. More...

#include "device.h"

Ameba Common

typedef struct pwmout_s pwmout_t
 
void pwmout_init (pwmout_t *obj, PinName pin)
 Initializes the PWM function/registers of the specified pin with default parameters. More...
 
void pwmout_free (pwmout_t *obj)
 Deinitializes the PWM device of the specified channel. More...
 
void pwmout_write (pwmout_t *obj, float percent)
 Set the duty cycle of the specified channel. More...
 
float pwmout_read (pwmout_t *obj)
 Get the duty cycle value of the specified channel. More...
 
void pwmout_period (pwmout_t *obj, float seconds)
 Set the period of the specified channel in seconds. More...
 
void pwmout_period_ms (pwmout_t *obj, int ms)
 Set the period of the specified channel in millseconds. More...
 
void pwmout_period_us (pwmout_t *obj, int us)
 Set the period of the specified channel in microseconds. More...
 
void pwmout_pulsewidth (pwmout_t *obj, float seconds)
 Set the pulse width of the specified channel in seconds. More...
 
void pwmout_pulsewidth_ms (pwmout_t *obj, int ms)
 Set the pulse width of the specified channel in milliseconds. More...
 
void pwmout_pulsewidth_us (pwmout_t *obj, int us)
 Set the pulse width of the specified channel in microseconds. More...
 

Detailed Description

This file provides mbed pwm API.

mbed Microcontroller Library

Author
Version
V1.0.0
Attention

Copyright (c) 2006-2013 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.