added driver sim

This commit is contained in:
Blaise Tine
2020-03-16 08:02:23 -04:00
parent 36547821fc
commit c41855ee42
14 changed files with 1837 additions and 170 deletions

15
driver/sw/utils.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
struct ihex_t {
static constexpr int MAX_LINE_SIZE = 524;
static constexpr int MAX_DATA_SIZE = 255;
uint8_t data[MAX_DATA_SIZE];
uint32_t address;
uint32_t data_size;
uint32_t offset;
bool has_offset;
bool is_eof;
};
int parse_ihex_line(char* line, ihex_t* out);