12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
-
- #ifndef MBED_PWMOUT_API_H
- #define MBED_PWMOUT_API_H
-
- #include "device.h"
-
- #if DEVICE_PWMOUT
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef struct pwmout_s pwmout_t;
-
- void pwmout_init (pwmout_t* obj, PinName pin);
- void pwmout_free (pwmout_t* obj);
-
- void pwmout_write (pwmout_t* obj, float percent);
- float pwmout_read (pwmout_t* obj);
-
- void pwmout_period (pwmout_t* obj, float seconds);
- void pwmout_period_ms (pwmout_t* obj, int ms);
- void pwmout_period_us (pwmout_t* obj, int us);
-
- void pwmout_pulsewidth (pwmout_t* obj, float seconds);
- void pwmout_pulsewidth_ms(pwmout_t* obj, int ms);
- void pwmout_pulsewidth_us(pwmout_t* obj, int us);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
- #endif
|