Documentation
For Arduino users
NexGpio Class Reference

NexGpio component. More...

#include <NexGpio.h>

Public Member Functions

bool pin_mode (uint32_t port, uint32_t mode, uint32_t control_id)
 Set gpio mode. More...
 
bool digital_write (uint32_t port, uint32_t value)
 write a HIGH or a LOW value to a digital pin More...
 
uint32_t digital_read (uint32_t port)
 read a HIGH or a LOW value to a digital pin More...
 
bool analog_write (uint32_t port, uint32_t value)
 writes an analog value (PWM wave) to a pin More...
 
bool set_pwmfreq (uint32_t value)
 writes pwm output frequency More...
 
uint32_t get_pwmfreq (uint32_t *number)
 read pwm output frequency More...
 

Detailed Description

NexGpio component.

Examples:
CompGpio.ino.

Definition at line 31 of file NexGpio.h.

Member Function Documentation

bool NexGpio::analog_write ( uint32_t  port,
uint32_t  value 
)

writes an analog value (PWM wave) to a pin

Parameters
port- the gpio port number
value- the duty cycle: between 0 (always off) and 100 (always on).
Returns
true if success, false for failure
Examples:
CompGpio.ino.

Definition at line 68 of file NexGpio.cpp.

uint32_t NexGpio::digital_read ( uint32_t  port)

read a HIGH or a LOW value to a digital pin

Parameters
port- the gpio port number
Returns
the value from a specified digital pin, either high or low
Examples:
CompGpio.ino.

Definition at line 53 of file NexGpio.cpp.

bool NexGpio::digital_write ( uint32_t  port,
uint32_t  value 
)

write a HIGH or a LOW value to a digital pin

Parameters
port- the gpio port number
value- HIGH or LOW
Returns
true if success, false for failure
Examples:
CompGpio.ino.

Definition at line 37 of file NexGpio.cpp.

uint32_t NexGpio::get_pwmfreq ( uint32_t *  number)

read pwm output frequency

Parameters
number- the frequency
Returns
true if success, false for failure

Definition at line 100 of file NexGpio.cpp.

bool NexGpio::pin_mode ( uint32_t  port,
uint32_t  mode,
uint32_t  control_id 
)

Set gpio mode.

Parameters
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
Returns
true if success, false for failure
Examples:
CompGpio.ino.

Definition at line 17 of file NexGpio.cpp.

bool NexGpio::set_pwmfreq ( uint32_t  value)

writes pwm output frequency

Parameters
value- the frequency: between 1 and 65535
Returns
true if success, false for failure

Definition at line 86 of file NexGpio.cpp.


The documentation for this class was generated from the following files: