en-us_commands:reference:fifo
This is an old revision of the document!
Table of Contents
FIFO()
FIFO() outputs the first stored 16-bit data first.
bool FIFO(uint8_t fifo_id, bool IN, bool OUT, uint16_t input, uint16_t &output, uint8_t size, bool reset = false)
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
FIFO(fifo_id, IN, OUT, input, output, size, reset) | uint8_t fifo_id — Buffer IDbool IN — Store input on the rising edgebool OUT — Output on the rising edgeuint16_t input — Word to storeuint16_t &output — Reference variable receiving the outputuint8_t size — Buffer sizebool reset = false — Reset the buffer | bool | Outputs the first stored 16-bit data first. |
Example
uint16_t fifoOut; FIFO(0, digitalRead(0), digitalRead(1), D[0], fifoOut, 10);
Precautions
IN, OUT, CU and CD act on rising edges. Use a unique id for each counter or buffer, and keep size to the required minimum.
en-us_commands/reference/fifo.1788785565.txt.gz · Last modified: by 127.0.0.1
