group::SYS_FIFO

This device is a FIFO RAM buffer. A write to the buffer adds data to the FIFO. A read from the buffer reads from the FIFO. If the FIFO fills up, additional writes will block until data arrives. Similarly, if the FIFO is empty, a read will block until data arrives.

Details

defineCFIFO_VERSION


defineCFIFO_IOC_CHAR


defineI_CFIFO_GETVERSION


defineI_CFIFO_GETINFO


defineI_CFIFO_SETATTR


defineI_CFIFO_GETOWNER


defineI_CFIFO_SETOWNER


defineI_CFIFO_FIFOINIT


defineI_CFIFO_FIFOFLUSH


defineI_CFIFO_FIFOEXIT


defineI_CFIFO_FIFOSETATTR


defineI_CFIFO_FIFOGETINFO


defineFFIFO_VERSION


defineFFIFO_IOC_CHAR


defineI_FFIFO_GETVERSION


defineI_FFIFO_GETINFO


defineI_FFIFO_SETATTR


defineI_FFIFO_FLUSH


defineI_FFIFO_INIT


defineI_FFIFO_EXIT


defineFIFO_VERSION


defineFIFO_IOC_CHAR


defineI_FIFO_GETVERSION


defineI_FIFO_GETINFO

This request gets the size of the FIFO in bytes. Example:

fifo_attr_t attr;
ioctl(fifo_fd, I_FIFO_ATTR, &attr);

defineI_FIFO_SETATTR


defineI_FIFO_FLUSH


defineI_FIFO_INIT


defineI_FIFO_EXIT


defineI_FIFO_PEEK

This request allows a process to peek at the data in the FIFO without reading it.

char buffer[16];
fifo_peek_t peek_req;
peek_req.buf = buffer; //Destination buffer
peek_req.loc = 0; //first available bytes in FIFO
peek_req.nbyte = 16; //peek up to 16 bytes
ioctl(fifo_fd, I_FIFO_PEEK, &peek);

defineI_FIFO_TOTAL


enum@6

  • CFIFO_FLAG_NONE

enum@15

  • FFIFO_FLAG_SET_WRITEBLOCK
  • FFIFO_FLAG_IS_OVERFLOW
  • FFIFO_FLAG_NOTIFY_WRITE
  • FFIFO_FLAG_NOTIFY_READ

enum@16

  • FIFO_FLAG_NONE
  • FIFO_FLAG_SET_WRITEBLOCK Write block flag
  • FIFO_FLAG_IS_OVERFLOW Overflow flag
  • FIFO_FLAG_NOTIFY_WRITE Notify on write
  • FIFO_FLAG_NOTIFY_READ Notify on read
  • FIFO_FLAG_INIT Initialize the FIFO
  • FIFO_FLAG_EXIT Shutdown the FIFO
  • FIFO_FLAG_FLUSH Flush the FIFO
  • FIFO_FLAG_IS_READ_BUSY Set internally when FIFO is reading
  • FIFO_FLAG_IS_WRITE_WHILE_READ_BUSY Set internally when FIFO is written while reading
  • FIFO_FLAG_IS_WRITE_BUSY Set internally when FIFO is being written
  • FIFO_FLAG_IS_WRITE_WHILE_WRITE_BUSY Set internally when FIFO is written while being written


date: “2019-06-27” layout: post title: struct::cfifo_info_t katex: true

categories: struct

Methods

Details

public u32o_flags

Fifo flags


public u16count

Total number of channels in the fifo


public u16size

The size of each channel


public u32o_ready

Bitmask of channels with at least one byte


public u32resd



date: “2019-06-27” layout: post title: struct::cfifo_attr_t katex: true

categories: struct

This structure defines the attributes of a FIFO. The attributes are read-only using I_FIFO_ATTR.

Methods

Details

public u32o_flags

Fifo flags


public u32resd



date: “2019-06-27” layout: post title: struct::cfifo_fiforequest_t katex: true

categories: struct

Methods

Details

public u32channel



date: “2019-06-27” layout: post title: struct::cfifo_fifoattr_t katex: true

categories: struct

Methods

Details

public u32channel


publicfifo_attr_tattr



date: “2019-06-27” layout: post title: struct::cfifo_fifoinfo_t katex: true

categories: struct

Methods

Details

public u32channel


public fifo_info_tinfo



date: “2019-06-27” layout: post title: struct::ffifo_info_t katex: true

categories: struct

Methods

Details

public u32o_flags

Fifo flags


public u16frame_count

Total number of frames in the fifo


public u16frame_size

Frame size of the fifo


public u16frame_count_ready

Number of frames being used


public u16resd_align


public u32resd



date: “2019-06-27” layout: post title: struct::ffifo_attr_t katex: true

categories: struct

This structure defines the attributes of a FIFO. The attributes are read-only using I_FIFO_ATTR.

Methods

Details

public u32o_flags

Fifo flags


public u32resd



date: “2019-06-27” layout: post title: struct::fifo_info_t katex: true

categories: struct

Methods

Details

public u32o_flags

Bitmask to indicate supported features


public u32size

The total number of bytes in the FIFO


public u32size_ready

The number of bytes ready to be read from the FIFO


public u32overflow

If non-zero, indicates data received in the buffer was discarded


public u32resd



date: “2019-06-27” layout: post title: struct::fifo_attr_t katex: true

categories: struct

This structure defines the attributes of a FIFO. The attributes are read-only using I_FIFO_ATTR.

Methods

Details

public u32o_flags

Use to set the write block


public u32resd



date: “2019-06-27” layout: post title: struct::fifo_peek_t katex: true

categories: struct

This is used when peeking at data in the FIFO

Methods

Details

public u32loc

The location to peek


public char *buf

A pointer to the buffer to receive peek bytes


public intnbyte

The number of bytes to peek


X

Thanks for Coming!

Subscribe to news and updates