Header file containing functions prototypes of PWM app library. More...
Go to the source code of this file.
Classes | |
struct | app_pwm_pin_t |
PWM IO configuration Structures. More... | |
struct | app_pwm_pin_cfg_t |
PWM configuration Structures. More... | |
struct | app_pwm_channel_init_t |
PWM Channel init Structure definition. More... | |
struct | pwm_env_t |
PWM device structure definition. More... | |
struct | app_pwm_params_t |
PWM parameters structure definition. More... | |
Macros | |
#define | APP_PWM_PIN_ENABLE 1 |
#define | APP_PWM_PIN_DISABLE 0 |
Enumerations | |
enum | app_pwm_id_t { APP_PWM_ID_0, APP_PWM_ID_1, APP_PWM_ID_MAX } |
PWM module Enumerations definition. More... | |
enum | app_pwm_active_channel_t { APP_PWM_ACTIVE_CHANNEL_A = 0x01, APP_PWM_ACTIVE_CHANNEL_B = 0x02, APP_PWM_ACTIVE_CHANNEL_C = 0x04, APP_PWM_ACTIVE_CHANNEL_ALL = 0x07, APP_PWM_ACTIVE_CHANNEL_CLEARED = 0x00 } |
PWM active channel Enumerations definition. More... | |
enum | app_pwm_state_t { APP_PWM_INVALID = 0, APP_PWM_ACTIVITY } |
App pwm state types. More... | |
enum | app_pwm_module_state_t { APP_PWM_STOP = 0, APP_PWM_START } |
App pwm module state types. More... | |
Functions | |
uint16_t | app_pwm_init (app_pwm_params_t *p_params) |
Initialize the APP PWM DRIVER. More... | |
uint16_t | app_pwm_deinit (app_pwm_id_t id) |
De-initialize the APP PWM DRIVER. More... | |
uint16_t | app_pwm_start (app_pwm_id_t id) |
Starts the PWM signal generation on the output. More... | |
uint16_t | app_pwm_stop (app_pwm_id_t id) |
Stops the PWM signal generation on the output. More... | |
uint16_t | app_pwm_update_freq (app_pwm_id_t id, uint32_t freq) |
Update the PWM frequency on the output. More... | |
uint16_t | app_pwm_config_channel (app_pwm_id_t id, app_pwm_active_channel_t channel, app_pwm_channel_init_t *p_config) |
Initialize the PWM channels according to the specified parameters. More... | |
pwm_handle_t * | app_pwm_get_handle (app_pwm_id_t id) |
Return the PWM handle. More... | |
Header file containing functions prototypes of PWM app library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file app_pwm.h.