7#ifndef ZEPHYR_INCLUDE_DRIVERS_FPGA_H_
8#define ZEPHYR_INCLUDE_DRIVERS_FPGA_H_
35typedef const char *(*fpga_api_get_info)(
const struct device *dev);
75 return api->
reset(dev);
94 return api->
load(dev, image_ptr, img_size);
110 if (api->
on == NULL) {
145 if (api->
off == NULL) {
149 return api->
off(dev);
enum FPGA_status(* fpga_api_get_status)(const struct device *dev)
Definition: fpga.h:29
FPGA_status
Definition: fpga.h:18
@ FPGA_STATUS_INACTIVE
Definition: fpga.h:22
@ FPGA_STATUS_ACTIVE
Definition: fpga.h:26
static enum FPGA_status fpga_get_status(const struct device *dev)
Read the status of FPGA.
Definition: fpga.h:54
static int fpga_load(const struct device *dev, uint32_t *image_ptr, uint32_t img_size)
Load the bitstream and program the FPGA.
Definition: fpga.h:88
const char *(* fpga_api_get_info)(const struct device *dev)
Definition: fpga.h:35
int(* fpga_api_reset)(const struct device *dev)
Definition: fpga.h:32
int(* fpga_api_off)(const struct device *dev)
Definition: fpga.h:34
int(* fpga_api_load)(const struct device *dev, uint32_t *image_ptr, uint32_t img_size)
Definition: fpga.h:30
static int fpga_off(const struct device *dev)
Turns off the FPGA.
Definition: fpga.h:140
static const char * fpga_get_info(const struct device *dev)
Returns information about the FPGA.
Definition: fpga.h:124
static int fpga_on(const struct device *dev)
Turns on the FPGA.
Definition: fpga.h:105
static int fpga_reset(const struct device *dev)
Reset the FPGA.
Definition: fpga.h:70
int(* fpga_api_on)(const struct device *dev)
Definition: fpga.h:33
#define ENOTSUP
Definition: errno.h:115
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
const void * api
Definition: device.h:373
fpga_api_on on
Definition: fpga.h:41
fpga_api_load load
Definition: fpga.h:40
fpga_api_off off
Definition: fpga.h:42
fpga_api_get_info get_info
Definition: fpga.h:43
fpga_api_reset reset
Definition: fpga.h:39
fpga_api_get_status get_status
Definition: fpga.h:38