13#ifndef ZEPHYR_INCLUDE_DRIVERS_FPGA_H_
14#define ZEPHYR_INCLUDE_DRIVERS_FPGA_H_
86typedef const char *(*fpga_api_get_info)(
const struct device *dev);
161 return api->
reset(dev);
184 return api->
load(dev, image_ptr, img_size);
207#define FPGA_GET_INFO_DEFAULT "n/a"
245 return api->
off(dev);
enum FPGA_status(* fpga_api_get_status)(const struct device *dev)
Callback API to read FPGA status.
Definition fpga.h:55
const char *(* fpga_api_get_info)(const struct device *dev)
Callback API to return information about the FPGA.
Definition fpga.h:86
int(* fpga_api_reset)(const struct device *dev)
Callback API to reset the FPGA.
Definition fpga.h:68
int(* fpga_api_off)(const struct device *dev)
Callback API to turn the FPGA off.
Definition fpga.h:80
int(* fpga_api_load)(const struct device *dev, uint32_t *image_ptr, uint32_t img_size)
Callback API to load a bitstream and program the FPGA.
Definition fpga.h:61
int(* fpga_api_on)(const struct device *dev)
Callback API to turn the FPGA on.
Definition fpga.h:74
FPGA_status
Definition fpga.h:35
static enum FPGA_status fpga_get_status(const struct device *dev)
Read the status of FPGA.
Definition fpga.h:129
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:174
static int fpga_off(const struct device *dev)
Turns off the FPGA.
Definition fpga.h:236
#define FPGA_GET_INFO_DEFAULT
Definition fpga.h:207
static const char * fpga_get_info(const struct device *dev)
Returns information about the FPGA.
Definition fpga.h:216
static int fpga_on(const struct device *dev)
Turns on the FPGA.
Definition fpga.h:195
static int fpga_reset(const struct device *dev)
Reset the FPGA.
Definition fpga.h:152
@ FPGA_STATUS_INACTIVE
Definition fpga.h:39
@ FPGA_STATUS_ACTIVE
Definition fpga.h:43
#define ENOTSUP
Unsupported value.
Definition errno.h:114
#define NULL
Definition iar_missing_defs.h:20
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:519
<span class="mlabel">Driver Operations</span> FPGA driver operations
Definition fpga.h:91
fpga_api_on on
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition fpga.h:107
fpga_api_load load
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition fpga.h:103
fpga_api_off off
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition fpga.h:111
fpga_api_get_info get_info
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition fpga.h:115
fpga_api_reset reset
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition fpga.h:99
fpga_api_get_status get_status
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition fpga.h:95