Hardware Application Layer for Buttons.
More...
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
Go to the source code of this file.
Hardware Application Layer for Buttons.
- Author
- Jesus Minjares (https://github.com/jminjares4)
- Version
- 0.1
- Date
- 2021-11-27
- Copyright
- Copyright (c) 2021
◆ ESP_INTR_FLAG_DEFAULT
#define ESP_INTR_FLAG_DEFAULT 0 |
◆ PULL_SEL_EN
◆ Button
◆ buttonInit()
void buttonInit |
( |
Button * |
button | ) |
|
Button Initialization for buttons.
- Parameters
-
button | pass a Button by reference |
- Returns
- None
- Note
- buttonInit() is use when the button or input will be read as high or low level for interrupt intitialization
- See also
- buttonInitIRQ()
◆ buttonInitIRQ()
void buttonInitIRQ |
( |
Button * |
button | ) |
|
buttonInitIRQ will intialize button for interrupt routine
- Parameters
-
button | pass a Button by referene |
- Returns
- None
- Parameters
-
button | pass a Button by referene |
- Returns
- None
◆ buttonInterrupt()
void buttonInterrupt |
( |
void * |
arg | ) |
|
buttonInterrupt will be an general routine for buttons interrupts.
- Parameters
-
◆ buttonRead()
int buttonRead |
( |
Button * |
button | ) |
|
buttonRead will read the gpio pin
- Parameters
-
button | pass a Button by reference |
- Returns
- int return either high or low || 0 or 1
- Parameters
-
button | pass a Button by reference |
- Returns
- int return either high or low || 0 or 1