Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
#include <NexGpio.h>
Public Member Functions | |
bool | pin_mode (uint32_t port, uint32_t mode, uint32_t control_id) |
bool | digital_write (uint32_t port, uint32_t value) |
uint32_t | digital_read (uint32_t port) |
bool | analog_write (uint32_t port, uint32_t value) |
bool | set_pwmfreq (uint32_t value) |
uint32_t | get_pwmfreq (uint32_t *number) |
NexGpio component.
bool NexGpio::analog_write | ( | uint32_t | port, |
uint32_t | value | ||
) |
writes an analog value (PWM wave) to a pin
port | - the gpio port number |
value | - the duty cycle: between 0 (always off) and 100 (always on). |
uint32_t NexGpio::digital_read | ( | uint32_t | port | ) |
read a HIGH or a LOW value to a digital pin
port | - the gpio port number |
bool NexGpio::digital_write | ( | uint32_t | port, |
uint32_t | value | ||
) |
write a HIGH or a LOW value to a digital pin
port | - the gpio port number |
value | - HIGH or LOW |
uint32_t NexGpio::get_pwmfreq | ( | uint32_t * | number | ) |
read pwm output frequency
number | - the frequency |
bool NexGpio::pin_mode | ( | uint32_t | port, |
uint32_t | mode, | ||
uint32_t | control_id | ||
) |
Set gpio mode
port | - the gpio port number |
mode | - set gpio port mode(0–Pull on the input 1–the control input binding 2–Push-pull output 3–pwm output 4–open mode leakage) |
control_id | - nextion controls id ,when the modeel is 1 to be valid |
bool NexGpio::set_pwmfreq | ( | uint32_t | value | ) |
writes pwm output frequency
value | - the frequency: between 1 and 65535 |