|
MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
|
MeshX PWM Interface. More...
Go to the source code of this file.
Functions | |
| meshx_err_t | meshx_pwm_init (void) |
| Initialize PWM subsystem. | |
| meshx_err_t | meshx_pwm_deinit (void) |
| Deinitialize PWM subsystem. | |
| meshx_err_t | meshx_pwm_start (uint8_t logical_pin) |
| Start PWM output on pin. | |
| meshx_err_t | meshx_pwm_stop (uint8_t logical_pin) |
| Stop PWM output on pin. | |
| meshx_err_t | meshx_pwm_set_duty_cycle (uint8_t logical_pin, uint8_t duty_cycle) |
| Set PWM duty cycle. | |
| meshx_err_t | meshx_pwm_get_duty_cycle (uint8_t logical_pin, uint8_t *duty_cycle) |
| Get PWM duty cycle. | |
| meshx_err_t | meshx_pwm_set_frequency (uint8_t logical_pin, uint32_t frequency) |
| Set PWM frequency. | |
| meshx_err_t | meshx_pwm_get_frequency (uint8_t logical_pin, uint32_t *frequency) |
| Get PWM frequency. | |
| meshx_err_t | meshx_pwm_set_resolution (uint8_t logical_pin, uint8_t resolution) |
| Set PWM resolution. | |
| meshx_err_t | meshx_pwm_get_resolution (uint8_t logical_pin, uint8_t *resolution) |
| Get PWM resolution. | |
MeshX PWM Interface.
This file defines the MeshX PWM interface for platform-abstracted PWM operations.
| meshx_err_t meshx_pwm_deinit | ( | void | ) |
Deinitialize PWM subsystem.
This function deinitializes the PWM subsystem and releases all resources.
This function deinitializes the PWM subsystem and releases all resources. It stops all PWM outputs, deconfigures channels, and cleans up platform resources.
| meshx_err_t meshx_pwm_get_duty_cycle | ( | uint8_t | logical_pin, |
| uint8_t * | duty_cycle ) |
Get PWM duty cycle.
| logical_pin | Logical pin number (0-255) | |
| [out] | duty_cycle | Pointer to store duty cycle |
| meshx_err_t meshx_pwm_get_frequency | ( | uint8_t | logical_pin, |
| uint32_t * | frequency ) |
Get PWM frequency.
| logical_pin | Logical pin number (0-255) | |
| [out] | frequency | Pointer to store frequency |
| meshx_err_t meshx_pwm_get_resolution | ( | uint8_t | logical_pin, |
| uint8_t * | resolution ) |
Get PWM resolution.
| logical_pin | Logical pin number (0-255) | |
| [out] | resolution | Pointer to store resolution |
| meshx_err_t meshx_pwm_init | ( | void | ) |
Initialize PWM subsystem.
This function initializes the PWM subsystem based on YAML configuration.
This function initializes the PWM subsystem based on compiled configuration. It sets up hardware PWM channels and configures all PWM pins according to their YAML configuration.
| meshx_err_t meshx_pwm_set_duty_cycle | ( | uint8_t | logical_pin, |
| uint8_t | duty_cycle ) |
Set PWM duty cycle.
| logical_pin | Logical pin number (0-255) |
| duty_cycle | Duty cycle (0-100%) |
| meshx_err_t meshx_pwm_set_frequency | ( | uint8_t | logical_pin, |
| uint32_t | frequency ) |
Set PWM frequency.
| logical_pin | Logical pin number (0-255) |
| frequency | Frequency in Hz |
| meshx_err_t meshx_pwm_set_resolution | ( | uint8_t | logical_pin, |
| uint8_t | resolution ) |
Set PWM resolution.
| logical_pin | Logical pin number (0-255) |
| resolution | Resolution in bits (typically 8-16) |
| meshx_err_t meshx_pwm_start | ( | uint8_t | logical_pin | ) |
Start PWM output on pin.
| logical_pin | Logical pin number (0-255) |
| meshx_err_t meshx_pwm_stop | ( | uint8_t | logical_pin | ) |
Stop PWM output on pin.
| logical_pin | Logical pin number (0-255) |