26template <
int bytecount,
int additional_
bytes>
57 for (
size_t j=0;j<len;j++){
73 int open = bytecount + additional_bytes -
rx_len;
76 int n = avail < open ? avail : open;
87 while (result < len) {
90 int open = bytecount + additional_bytes -
rx_len;
97 if ((
size_t)n > len - result) n = len - result;
128 int total = bytecount + additional_bytes;
131 while (written < total) {
137 LOGE(
"ReedSolomonFEC: could not write block: %d of %d bytes", written, total);
149 if (
rx_len < bytecount + additional_bytes)
return false;
152 LOGW(
"ReedSolomonFEC: block could not be corrected");
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define LOGE(...)
Definition AudioLoggerIDF.h:30
virtual size_t write(const uint8_t *data, size_t len)
Definition Arduino.h:120
int Decode(const void *src, void *dst, uint8_t *erase_pos=NULL, size_t erase_count=0)
Definition rs.hpp:234
void Encode(const void *src, void *dst)
Definition rs.hpp:120
virtual size_t readBytes(uint8_t *data, size_t len)
Definition Arduino.h:140
virtual int available()
Definition Arduino.h:139