Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pwmout_api.h

    r321 r429  
     1
     2/** \addtogroup hal */
     3/** @{*/
    14/* mbed Microcontroller Library
    25 * Copyright (c) 2006-2013 ARM Limited
     
    2528#endif
    2629
     30/** Pwmout hal structure. pwmout_s is declared in the target's hal
     31 */
    2732typedef struct pwmout_s pwmout_t;
    2833
    29 void pwmout_init         (pwmout_t* obj, PinName pin);
    30 void pwmout_free         (pwmout_t* obj);
     34/**
     35 * \defgroup hal_pwmout Pwmout hal functions
     36 * @{
     37 */
    3138
    32 void  pwmout_write       (pwmout_t* obj, float percent);
    33 float pwmout_read        (pwmout_t* obj);
     39/** Initialize the pwm out peripheral and configure the pin
     40 *
     41 * @param obj The pwmout object to initialize
     42 * @param pin The pwmout pin to initialize
     43 */
     44void pwmout_init(pwmout_t *obj, PinName pin);
    3445
    35 void pwmout_period       (pwmout_t* obj, float seconds);
    36 void pwmout_period_ms    (pwmout_t* obj, int ms);
    37 void pwmout_period_us    (pwmout_t* obj, int us);
     46/** Deinitialize the pwmout object
     47 *
     48 * @param obj The pwmout object
     49 */
     50void pwmout_free(pwmout_t *obj);
    3851
    39 void pwmout_pulsewidth   (pwmout_t* obj, float seconds);
    40 void pwmout_pulsewidth_ms(pwmout_t* obj, int ms);
    41 void pwmout_pulsewidth_us(pwmout_t* obj, int us);
     52/** Set the output duty-cycle in range <0.0f, 1.0f>
     53 *
     54 * Value 0.0f represents 0 percentage, 1.0f represents 100 percent.
     55 * @param obj     The pwmout object
     56 * @param percent The floating-point percentage number
     57 */
     58void pwmout_write(pwmout_t *obj, float percent);
     59
     60/** Read the current float-point output duty-cycle
     61 *
     62 * @param obj The pwmout object
     63 * @return A floating-point output duty-cycle
     64 */
     65float pwmout_read(pwmout_t *obj);
     66
     67/** Set the PWM period specified in seconds, keeping the duty cycle the same
     68 *
     69 * Periods smaller than microseconds (the lowest resolution) are set to zero.
     70 * @param obj     The pwmout object
     71 * @param seconds The floating-point seconds period
     72 */
     73void pwmout_period(pwmout_t *obj, float seconds);
     74
     75/** Set the PWM period specified in miliseconds, keeping the duty cycle the same
     76 *
     77 * @param obj The pwmout object
     78 * @param ms  The milisecond period
     79 */
     80void pwmout_period_ms(pwmout_t *obj, int ms);
     81
     82/** Set the PWM period specified in microseconds, keeping the duty cycle the same
     83 *
     84 * @param obj The pwmout object
     85 * @param us  The microsecond period
     86 */
     87void pwmout_period_us(pwmout_t *obj, int us);
     88
     89/** Set the PWM pulsewidth specified in seconds, keeping the period the same.
     90 *
     91 * @param obj     The pwmout object
     92 * @param seconds The floating-point pulsewidth in seconds
     93 */
     94void pwmout_pulsewidth(pwmout_t *obj, float seconds);
     95
     96/** Set the PWM pulsewidth specified in miliseconds, keeping the period the same.
     97 *
     98 * @param obj The pwmout object
     99 * @param ms  The floating-point pulsewidth in miliseconds
     100 */
     101void pwmout_pulsewidth_ms(pwmout_t *obj, int ms);
     102
     103/** Set the PWM pulsewidth specified in microseconds, keeping the period the same.
     104 *
     105 * @param obj The pwmout object
     106 * @param us  The floating-point pulsewidth in microseconds
     107 */
     108void pwmout_pulsewidth_us(pwmout_t *obj, int us);
     109
     110/**@}*/
    42111
    43112#ifdef __cplusplus
     
    48117
    49118#endif
     119
     120/** @}*/
Note: See TracChangeset for help on using the changeset viewer.