SRA Board Components
ESP-IDF component for SRA Board
|
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "esp_err.h"
#include "pin_defs.h"
Go to the source code of this file.
Functions | |
esp_err_t | enable_switches () |
Enables tactile switches on the sra board, sets up required gpio's in input pull-up mode. More... | |
int | read_switch (int switch_id) |
Reads the state of one of the four switches on sra board. More... | |
esp_err_t enable_switches | ( | ) |
Enables tactile switches on the sra board, sets up required gpio's in input pull-up mode.
int read_switch | ( | int | switch_id | ) |
Reads the state of one of the four switches on sra board.
switch_id | id of the switch which needs to be read, we can pass the following macros: SWITCH_1, SWITCH_2, SWITCH_3, SWITCH_4. |