DistributedEmbeddedSystemsL.../03_io_access/lib/io.h

20 lines
506 B
C

#ifndef IO_LIB_H
#define IO_LIB_H
// Function to initialize the GPIO chip, LED line, and Button line
int initialize_gpio(const char *chip_name, int led_pin, int button_pin);
// Function to set the LED state
void set_led_state(int state);
// Function to read the Button state
int read_button_state();
// Function to cleanup the GPIO chip, LED line, and Button line
void cleanup_gpio();
// Function to read the temperature from a sensor
float read_temperature(const char *sensor_path);
#endif // LIB_H