Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
hal/pwmout_api.h@16:076cbe3e55be, 2016-08-15 (annotated)
- Committer:
- modtronix-com
- Date:
- Mon Aug 15 14:57:08 2016 +1000
- Revision:
- 16:076cbe3e55be
- Parent:
- 1:71204b8406f2
Added tag v1.0 for changeset 8123a070ade6
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| modtronix | 1:71204b8406f2 | 1 | /* mbed Microcontroller Library |
| modtronix | 1:71204b8406f2 | 2 | * Copyright (c) 2006-2013 ARM Limited |
| modtronix | 1:71204b8406f2 | 3 | * |
| modtronix | 1:71204b8406f2 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| modtronix | 1:71204b8406f2 | 5 | * you may not use this file except in compliance with the License. |
| modtronix | 1:71204b8406f2 | 6 | * You may obtain a copy of the License at |
| modtronix | 1:71204b8406f2 | 7 | * |
| modtronix | 1:71204b8406f2 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| modtronix | 1:71204b8406f2 | 9 | * |
| modtronix | 1:71204b8406f2 | 10 | * Unless required by applicable law or agreed to in writing, software |
| modtronix | 1:71204b8406f2 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| modtronix | 1:71204b8406f2 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| modtronix | 1:71204b8406f2 | 13 | * See the License for the specific language governing permissions and |
| modtronix | 1:71204b8406f2 | 14 | * limitations under the License. |
| modtronix | 1:71204b8406f2 | 15 | */ |
| modtronix | 1:71204b8406f2 | 16 | #ifndef MBED_PWMOUT_API_H |
| modtronix | 1:71204b8406f2 | 17 | #define MBED_PWMOUT_API_H |
| modtronix | 1:71204b8406f2 | 18 | |
| modtronix | 1:71204b8406f2 | 19 | #include "device.h" |
| modtronix | 1:71204b8406f2 | 20 | |
| modtronix | 1:71204b8406f2 | 21 | #if DEVICE_PWMOUT |
| modtronix | 1:71204b8406f2 | 22 | |
| modtronix | 1:71204b8406f2 | 23 | #ifdef __cplusplus |
| modtronix | 1:71204b8406f2 | 24 | extern "C" { |
| modtronix | 1:71204b8406f2 | 25 | #endif |
| modtronix | 1:71204b8406f2 | 26 | |
| modtronix | 1:71204b8406f2 | 27 | typedef struct pwmout_s pwmout_t; |
| modtronix | 1:71204b8406f2 | 28 | |
| modtronix | 1:71204b8406f2 | 29 | void pwmout_init (pwmout_t* obj, PinName pin); |
| modtronix | 1:71204b8406f2 | 30 | void pwmout_free (pwmout_t* obj); |
| modtronix | 1:71204b8406f2 | 31 | |
| modtronix | 1:71204b8406f2 | 32 | void pwmout_write (pwmout_t* obj, float percent); |
| modtronix | 1:71204b8406f2 | 33 | float pwmout_read (pwmout_t* obj); |
| modtronix | 1:71204b8406f2 | 34 | |
| modtronix | 1:71204b8406f2 | 35 | void pwmout_period (pwmout_t* obj, float seconds); |
| modtronix | 1:71204b8406f2 | 36 | void pwmout_period_ms (pwmout_t* obj, int ms); |
| modtronix | 1:71204b8406f2 | 37 | void pwmout_period_us (pwmout_t* obj, int us); |
| modtronix | 1:71204b8406f2 | 38 | |
| modtronix | 1:71204b8406f2 | 39 | void pwmout_pulsewidth (pwmout_t* obj, float seconds); |
| modtronix | 1:71204b8406f2 | 40 | void pwmout_pulsewidth_ms(pwmout_t* obj, int ms); |
| modtronix | 1:71204b8406f2 | 41 | void pwmout_pulsewidth_us(pwmout_t* obj, int us); |
| modtronix | 1:71204b8406f2 | 42 | |
| modtronix | 1:71204b8406f2 | 43 | #ifdef __cplusplus |
| modtronix | 1:71204b8406f2 | 44 | } |
| modtronix | 1:71204b8406f2 | 45 | #endif |
| modtronix | 1:71204b8406f2 | 46 | |
| modtronix | 1:71204b8406f2 | 47 | #endif |
| modtronix | 1:71204b8406f2 | 48 | |
| modtronix | 1:71204b8406f2 | 49 | #endif |