GrowNode
gn_gpio.c File Reference

Data Structures

struct  gn_gpio_data_t
 

Macros

#define LOG_LOCAL_LEVEL   ESP_LOG_VERBOSE
 
#define TAG   "gn_leaf_gpio"
 

Functions

gn_leaf_handle_t gn_gpio_fastcreate (gn_node_handle_t node, const char *leaf_name, int gpio, bool inverted, bool toggled)
 
void gn_gpio_task (gn_leaf_handle_t leaf_config)
 
gn_leaf_descriptor_handle_t gn_gpio_config (gn_leaf_handle_t leaf_config)
 

Macro Definition Documentation

◆ LOG_LOCAL_LEVEL

#define LOG_LOCAL_LEVEL   ESP_LOG_VERBOSE

◆ TAG

#define TAG   "gn_leaf_gpio"

Function Documentation

◆ gn_gpio_config()

gn_leaf_descriptor_handle_t gn_gpio_config ( gn_leaf_handle_t  leaf_config)

◆ gn_gpio_fastcreate()

gn_leaf_handle_t gn_gpio_fastcreate ( gn_node_handle_t  node,
const char *  leaf_name,
int  gpio,
bool  inverted,
bool  toggled 
)

creates a GPIO leaf defining all parameters

Parameters
nodethe parent node
leaf_namethe name of the leaf to be created
gpiothe GPIO number to attach this leaf
invertedif the GPIO need to work in inverted mode (toggle = true -> gpio = false)
toggledthe initial status
Returns
an handle to the leaf initialized
NULL in case of errors

◆ gn_gpio_task()

void gn_gpio_task ( gn_leaf_handle_t  leaf_config)