blob: 6518e4bf018b72460d93e39d3bdbfa7dc6417f20 [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#ifndef GPIODPI_H_
#define GPIODPI_H_
#include <limits.h>
#include <svdpi.h>
extern "C" {
struct gpiodpi_ctx {
int n_bits;
int fifo_fd;
char fifo_pathname[PATH_MAX];
};
void *gpiodpi_create(const char *name, int n_bits);
void gpiodpi_device_to_host(void *ctx_void, svBitVecVal *gpio_data,
svBitVecVal *gpio_oe);
void gpiodpi_close(void *ctx_void);
}
#endif // GPIODPI_H_