20 lines
433 B
C
20 lines
433 B
C
#pragma once
|
|
|
|
#include "link.h"
|
|
|
|
struct gpio_state {
|
|
int chip_fd;
|
|
int led_request_fd;
|
|
int switch_request_fd;
|
|
};
|
|
|
|
int gpio_open(const char * path,
|
|
struct gpio_state * gpio_state);
|
|
|
|
void gpio_set_values(struct gpio_state * gpio_state, uint64_t bits);
|
|
|
|
uint64_t gpio_get_values(struct gpio_state * gpio_state);
|
|
|
|
void gpio_set_values_from_link_state(struct gpio_state * gpio_state,
|
|
struct link_state * link_state);
|