12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- struct bouncebuffer_t {
- uint8_t *dma_buf;
- uint8_t *orig_buf;
- uint32_t size;
- bool busy;
- bool is_sdcard;
- };
- void bouncebuffer_init(struct bouncebuffer_t **bouncebuffer, uint32_t prealloc_bytes, bool sdcard);
- void bouncebuffer_setup_read(struct bouncebuffer_t *bouncebuffer, uint8_t **buf, uint32_t size);
-
- void bouncebuffer_finish_read(struct bouncebuffer_t *bouncebuffer, const uint8_t *buf, uint32_t size);
-
- void bouncebuffer_setup_write(struct bouncebuffer_t *bouncebuffer, const uint8_t **buf, uint32_t size);
-
- void bouncebuffer_finish_write(struct bouncebuffer_t *bouncebuffer, const uint8_t *buf);
- #ifdef __cplusplus
- }
- #endif
|