MATSU-bed(LPC1549)でPWMを4つ以上出すプログラム
Dependents: servo_controller_1549
pwm_all_api.h@0:64b18a3829f1, 2016-04-20 (annotated)
- Committer:
- hardtail
- Date:
- Wed Apr 20 08:12:06 2016 +0000
- Revision:
- 0:64b18a3829f1
- Child:
- 1:aefedd6b2a6f
??????????LPC1549?PWM?4?????????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hardtail | 0:64b18a3829f1 | 1 | /* mbed Microcontroller Library |
hardtail | 0:64b18a3829f1 | 2 | * Copyright (c) 2006-2013 ARM Limited |
hardtail | 0:64b18a3829f1 | 3 | * |
hardtail | 0:64b18a3829f1 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
hardtail | 0:64b18a3829f1 | 5 | * you may not use this file except in compliance with the License. |
hardtail | 0:64b18a3829f1 | 6 | * You may obtain a copy of the License at |
hardtail | 0:64b18a3829f1 | 7 | * |
hardtail | 0:64b18a3829f1 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
hardtail | 0:64b18a3829f1 | 9 | * |
hardtail | 0:64b18a3829f1 | 10 | * Unless required by applicable law or agreed to in writing, software |
hardtail | 0:64b18a3829f1 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
hardtail | 0:64b18a3829f1 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
hardtail | 0:64b18a3829f1 | 13 | * See the License for the specific language governing permissions and |
hardtail | 0:64b18a3829f1 | 14 | * limitations under the License. |
hardtail | 0:64b18a3829f1 | 15 | */ |
hardtail | 0:64b18a3829f1 | 16 | #ifndef MBED_PWM_ALL_API_H |
hardtail | 0:64b18a3829f1 | 17 | #define MBED_PWM_ALL_API_H |
hardtail | 0:64b18a3829f1 | 18 | |
hardtail | 0:64b18a3829f1 | 19 | #include "device.h" |
hardtail | 0:64b18a3829f1 | 20 | |
hardtail | 0:64b18a3829f1 | 21 | |
hardtail | 0:64b18a3829f1 | 22 | #ifdef __cplusplus |
hardtail | 0:64b18a3829f1 | 23 | extern "C" { |
hardtail | 0:64b18a3829f1 | 24 | #endif |
hardtail | 0:64b18a3829f1 | 25 | |
hardtail | 0:64b18a3829f1 | 26 | typedef struct pwmout_s pwmout_t; |
hardtail | 0:64b18a3829f1 | 27 | |
hardtail | 0:64b18a3829f1 | 28 | void pwmout_init (pwmout_t* obj, PinName pin); |
hardtail | 0:64b18a3829f1 | 29 | void pwmout_free (pwmout_t* obj); |
hardtail | 0:64b18a3829f1 | 30 | |
hardtail | 0:64b18a3829f1 | 31 | void pwmout_write (pwmout_t* obj, float percent); |
hardtail | 0:64b18a3829f1 | 32 | float pwmout_read (pwmout_t* obj); |
hardtail | 0:64b18a3829f1 | 33 | |
hardtail | 0:64b18a3829f1 | 34 | void pwmout_period (pwmout_t* obj, float seconds); |
hardtail | 0:64b18a3829f1 | 35 | void pwmout_period_ms (pwmout_t* obj, int ms); |
hardtail | 0:64b18a3829f1 | 36 | void pwmout_period_us (pwmout_t* obj, int us); |
hardtail | 0:64b18a3829f1 | 37 | |
hardtail | 0:64b18a3829f1 | 38 | void pwmout_pulsewidth (pwmout_t* obj, float seconds); |
hardtail | 0:64b18a3829f1 | 39 | void pwmout_pulsewidth_ms(pwmout_t* obj, int ms); |
hardtail | 0:64b18a3829f1 | 40 | void pwmout_pulsewidth_us(pwmout_t* obj, int us); |
hardtail | 0:64b18a3829f1 | 41 | |
hardtail | 0:64b18a3829f1 | 42 | #ifdef __cplusplus |
hardtail | 0:64b18a3829f1 | 43 | } |
hardtail | 0:64b18a3829f1 | 44 | #endif |
hardtail | 0:64b18a3829f1 | 45 | |
hardtail | 0:64b18a3829f1 | 46 | |
hardtail | 0:64b18a3829f1 | 47 | #endif |