23#ifndef RCBENCH_ART_FETCH_H
24#define RCBENCH_ART_FETCH_H
44 bool (*
read_page)(
void *ctx, uint8_t page, uint8_t count, uint16_t *regs);
50 bool (*
write_reg)(
void *ctx, uint8_t page, uint8_t reg, uint16_t value);
90 uint32_t *bytes,
const char **why);
art_fetch_state_t art_fetch_step(art_fetch_t *f, const art_transport_t *t, unsigned blocks)
Ask for up to blocks of it.
Definition art_fetch.c:105
uint16_t art_fetch_crc(const art_fetch_t *f)
The CRC of the drawing.
Definition art_fetch.c:165
uint16_t art_fetch_width(const art_fetch_t *f)
The width of the drawing.
Definition art_fetch.c:155
bool art_fetch_begin(art_fetch_t *f, const uint16_t *meta_regs, uint8_t *buf, uint32_t cap)
Get ready to assemble into buf.
Definition art_fetch.c:89
bool art_fetch_key(const uint16_t *meta_regs, uint16_t board, art_entry_t *out)
The cache entry meta_regs describe for board: the content key a kept drawing has to match field for f...
Definition art_fetch.c:68
const char * art_fetch_why(const art_fetch_t *f)
Why it stopped, for a log line.
Definition art_fetch.c:180
uint32_t art_fetch_hash(const art_fetch_t *f)
The hash of the drawing.
Definition art_fetch.c:170
uint32_t art_fetch_bytes(const art_fetch_t *f)
The size of the drawing in bytes.
Definition art_fetch.c:175
uint16_t art_fetch_format(const art_fetch_t *f)
What the drawing is, once it is whole.
Definition art_fetch.c:150
bool art_fetch_meta(const art_transport_t *t, uint16_t *meta_regs, uint32_t *bytes, const char **why)
What the far end says its drawing is: LINK_AW_COUNT registers into meta_regs.
Definition art_fetch.c:31
uint16_t art_fetch_height(const art_fetch_t *f)
The height of the drawing.
Definition art_fetch.c:160
art_fetch_state_t
States of a fetch.
Definition art_fetch.h:55
@ ART_FETCH_FAILED
Definition art_fetch.h:59
@ ART_FETCH_IDLE
Definition art_fetch.h:56
@ ART_FETCH_RUNNING
Definition art_fetch.h:57
@ ART_FETCH_DONE
Definition art_fetch.h:58
Keeping a board's drawing, so it is fetched once and not every time the link comes up.
Assembling a board drawing out of the blocks the link carries it in.
What a slot says it holds: the board and the ARTWORK page it came from.
Definition art_store.h:65
State of one fetch.
Definition art_fetch.h:63
How the sequence reaches the far end.
Definition art_fetch.h:37
bool(*) read_page(void *ctx, uint8_t page, uint8_t count, uint16_t *regs)
Read count registers of page.
Definition art_fetch.h:44
bool(*) write_reg(void *ctx, uint8_t page, uint8_t reg, uint16_t value)
Write one register.
Definition art_fetch.h:50
State of one board drawing transfer.
Definition link_artxfer.h:48