|
FreeRTOS:
Common I/O
AWS IoT Common I/O library
|
| Return to main page ↑ |
Data Structures | |
| struct | IotPwmConfig_t |
| PWM configuration type. More... | |
Macros | |
| #define | IOT_PWM_SUCCESS ( 0 ) |
| Return values used by PWM driver. More... | |
| #define | IOT_PWM_INVALID_VALUE ( 1 ) |
| #define | IOT_PWM_NOT_CONFIGURED ( 2 ) |
| #define | IOT_PWM_FUNCTION_NOT_SUPPORTED ( 3 ) |
Typedefs | |
| typedef struct IotPwmDescriptor * | IotPwmHandle_t |
| IotPwmHandle_t type is the PWM handle returned by calling iot_pwm_open() this is initialized in open and returned to caller. Caller must pass this pointer to the rest of the APIs. | |
Functions | |
| IotPwmHandle_t | iot_pwm_open (int32_t lPwmInstance) |
| iot_pwm_open is used to initialize the PWM driver instance. this API will configure PWM and may reset the PWM hardware. More... | |
| int32_t | iot_pwm_set_config (IotPwmHandle_t const pxPwmHandle, const IotPwmConfig_t xConfig) |
| iot_pwm_set_config sets up the PWM frequency and duty cycle to generate the PWM pulses required. More... | |
| IotPwmConfig_t * | iot_pwm_get_config (IotPwmHandle_t const pxPwmHandle) |
| iot_pwm_get_config returns the current PWM configuration More... | |
| int32_t | iot_pwm_start (IotPwmHandle_t const pxPwmHandle) |
| Start the PWM hardware. PWM configuration must be set before PWM is started. PWM signal availability on the configured output based on the PWMChannel configured in iot_pwm_set_config(). More... | |
| int32_t | iot_pwm_stop (IotPwmHandle_t const pxPwmHandle) |
| Stop the PWM hardware. More... | |
| int32_t | iot_pwm_close (IotPwmHandle_t const pxPwmHandle) |
| iot_pwm_close de-initializes the PWM. More... | |
| #define IOT_PWM_SUCCESS ( 0 ) |
Return values used by PWM driver.
PWM operation completed successfully.
| #define IOT_PWM_INVALID_VALUE ( 1 ) |
At least one parameter is invalid.
| #define IOT_PWM_NOT_CONFIGURED ( 2 ) |
PWM must be configured prior to start.
| #define IOT_PWM_FUNCTION_NOT_SUPPORTED ( 3 ) |
PWM operation not supported.
| IotPwmHandle_t iot_pwm_open | ( | int32_t | lPwmInstance | ) |
iot_pwm_open is used to initialize the PWM driver instance. this API will configure PWM and may reset the PWM hardware.
| [in] | lPwmInstance | The instance of the PWM to initialize. PWM is output only. |
| int32_t iot_pwm_set_config | ( | IotPwmHandle_t const | pxPwmHandle, |
| const IotPwmConfig_t | xConfig | ||
| ) |
iot_pwm_set_config sets up the PWM frequency and duty cycle to generate the PWM pulses required.
| [in] | pxPwmHandle | Handle to PWM driver returned in iot_pwm_open |
| [in] | xConfig | PWM configuration to be setup. |
| IotPwmConfig_t* iot_pwm_get_config | ( | IotPwmHandle_t const | pxPwmHandle | ) |
iot_pwm_get_config returns the current PWM configuration
| [in] | pxPwmHandle | Handle to PWM driver returned in iot_pwm_open |
| int32_t iot_pwm_start | ( | IotPwmHandle_t const | pxPwmHandle | ) |
Start the PWM hardware. PWM configuration must be set before PWM is started. PWM signal availability on the configured output based on the PWMChannel configured in iot_pwm_set_config().
| [in] | pxPwmHandle | Handle to PWM driver returned in iot_pwm_open |
| int32_t iot_pwm_stop | ( | IotPwmHandle_t const | pxPwmHandle | ) |
Stop the PWM hardware.
| [in] | pxPwmHandle | Handle to PWM driver returned in iot_pwm_open |
| int32_t iot_pwm_close | ( | IotPwmHandle_t const | pxPwmHandle | ) |
iot_pwm_close de-initializes the PWM.
| [in] | pxPwmHandle | Handle to PWM driver returned in iot_pwm_open |