![]() |
flinklib
flinklib: flink C library for Linux
|
Contains low level operations for flink. More...
#include "flinklib.h"#include "flinkioctl.h"#include "types.h"#include "error.h"#include "log.h"#include "valid.h"#include <sys/ioctl.h>#include <unistd.h>
Go to the source code of this file.
Functions | |
| int | flink_ioctl (flink_dev *dev, int cmd, void *arg) |
| IOCTL operation for a flink device. More... | |
| ssize_t | flink_read (flink_subdev *subdev, uint32_t offset, uint8_t size, void *rdata) |
| Read from a flink subdevice. More... | |
| ssize_t | flink_write (flink_subdev *subdev, uint32_t offset, uint8_t size, void *wdata) |
| Write to a flink subdevice. More... | |
| int | flink_read_bit (flink_subdev *subdev, uint32_t offset, uint8_t bit, void *rdata) |
| Read a single bit from a flink subdevice. More... | |
| int | flink_write_bit (flink_subdev *subdev, uint32_t offset, uint8_t bit, void *wdata) |
| Write a single bit to a flink subdevice. More... | |
Contains low level operations for flink.
Contains functions to read from and write to the memory bank of flink devices directly. These functions can be used to communicate with user-defined flink subdevices.
Definition in file lowlevel.c.
| int flink_ioctl | ( | flink_dev * | dev, |
| int | cmd, | ||
| void * | arg | ||
| ) |
IOCTL operation for a flink device.
| dev | Flink device handle. |
| cmd | IOCTL command. |
| arg | IOCTL arguments. |
Definition at line 44 of file lowlevel.c.

| ssize_t flink_read | ( | flink_subdev * | subdev, |
| uint32_t | offset, | ||
| uint8_t | size, | ||
| void * | rdata | ||
| ) |
Read from a flink subdevice.
| subdev | Subdevice to read from. |
| offset | Read offset, relative to the subdevice base address. |
| size | Nof bytes to read. |
| rdata | Pointer to a buffer where the read bytes are written to. |
Definition at line 71 of file lowlevel.c.

| int flink_read_bit | ( | flink_subdev * | subdev, |
| uint32_t | offset, | ||
| uint8_t | bit, | ||
| void * | rdata | ||
| ) |
Read a single bit from a flink subdevice.
| subdev | Subdevice to read from. |
| offset | Read offset, relative to the subdevice base address. |
| bit | Bit number to read in the byte given by offset. |
| rdata | Pointer to a buffer where the bit read should be written |
Definition at line 149 of file lowlevel.c.

| ssize_t flink_write | ( | flink_subdev * | subdev, |
| uint32_t | offset, | ||
| uint8_t | size, | ||
| void * | wdata | ||
| ) |
Write to a flink subdevice.
| subdev | Subdevice to write to. |
| offset | Write offset, relative to the subdevice base address. |
| size | Nof bytes to write. |
| wdata | Data to write. |
Definition at line 110 of file lowlevel.c.

| int flink_write_bit | ( | flink_subdev * | subdev, |
| uint32_t | offset, | ||
| uint8_t | bit, | ||
| void * | wdata | ||
| ) |
Write a single bit to a flink subdevice.
| subdev | Subdevice to write to. |
| offset | Write offset, relative to the subdevice base address. |
| bit | Bit number to write in the byte given by offset. |
| wdata | Bit to write, a value of nonzero sets the bit, 0 clears the bit |
Definition at line 187 of file lowlevel.c.
