Files
ProtoPirate/helpers/raw_file_reader.h
0mega 62b31bfe95 More Memory optimizations and new protocols
- Split RX registries into more plugins: AM, AM VAG, FM, FM F4, and FM Honda1
- Add per-protocol TX plugins so emulation loads only the selected encoder
- Sub Decode (enabled by default) and Timing Tuner as plugins
- Max history increased to 20 signals
- Fix Sub Decode and simplified UI
- Add Check Saved setting ported from dexter_pester PR !
- Fix Fiat V1 decoder and add HITAG2 key TX support
- Add Renault V0, Fiat V2, Honda V2, Ford V3 (& US variant) Thanks Ash

Sorry this is a lot at once x)
2026-06-30 21:28:26 +02:00

35 lines
1.0 KiB
C

#pragma once
#include "../protopirate_app_i.h"
#ifdef ENABLE_SUB_DECODE_SCENE
#include <furi.h>
#include <storage/storage.h>
#include <flipper_format/flipper_format.h>
#include <toolbox/stream/stream.h>
#define RAW_READER_BUFFER_SIZE 2048U
typedef struct {
Storage* storage;
FlipperFormat* ff;
Stream* stream;
uint8_t buffer[RAW_READER_BUFFER_SIZE];
uint16_t buffer_count;
uint16_t buffer_index;
bool in_line;
bool file_finished;
bool storage_opened;
uint64_t file_size;
uint64_t data_start_offset;
uint64_t stream_pos;
} RawFileReader;
RawFileReader* raw_file_reader_alloc(void);
void raw_file_reader_free(RawFileReader* reader);
bool raw_file_reader_open(RawFileReader* reader, const char* file_path);
void raw_file_reader_close(RawFileReader* reader);
bool raw_file_reader_get_next(RawFileReader* reader, bool* level, uint32_t* duration);
bool raw_file_reader_is_finished(RawFileReader* reader);
uint8_t raw_file_reader_get_progress(const RawFileReader* reader);
#endif // ENABLE_SUB_DECODE_SCENE