Sensor Data Logger v1.0
ESP32 Data Logger
Loading...
Searching...
No Matches
button.c File Reference

button.h source code More...

#include <stdio.h>
#include "button.h"
#include "esp_idf_version.h"
Include dependency graph for button.c:

Functions

void button_enable (button_t *const button)
 button_t Initialization for buttons More...
 
int read_button (button_t *const button)
 buttonRead will read the pin pin More...
 
void button_enable_irq (button_t *const button)
 buttonInitIRQ will intialize button for interrupt routine More...
 

Variables

int gpio_install_count = 0
 

Detailed Description

button.h source code

Author
Jesus Minjares (https://github.com/jminjares4)
Version
0.1
Date
2022-08-09

Function Documentation

◆ button_enable()

void button_enable ( button_t *const  button)

button_t Initialization for buttons

Parameters
buttonpass a button_t by reference
Returns
None
Note
button_enable() is use when the button or input will be read as high or low level for interrupt intitialization
See also
button_enable_irq()

◆ button_enable_irq()

void button_enable_irq ( button_t *const  button)

buttonInitIRQ will intialize button for interrupt routine

Parameters
buttonpass a button_t by referene
Returns
None

◆ read_button()

int read_button ( button_t *const  button)

buttonRead will read the pin pin

buttonRead will read the gpio pin

Parameters
buttonpass a button_t by reference
Returns
int return either high or low || 0 or 1

Variable Documentation

◆ gpio_install_count

int gpio_install_count = 0