Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework data section types #90

Open
BlockoS opened this issue Nov 2, 2024 · 0 comments
Open

Rework data section types #90

BlockoS opened this issue Nov 2, 2024 · 0 comments

Comments

@BlockoS
Copy link
Collaborator

BlockoS commented Nov 2, 2024

Create a type for each data type, i.e.

typedef struct {
    DataType type;
    int32_t element_size;
    int32_t elements_per_line;
} DataHex;

typedef struct {
    DataType type;
} DataBinary;

typedef struct {
    DataType type;
    int32_t elements_per_line;
    struct {
        uint8_t data[8U];
        uint8_t length;
    } delimiter;
} DataString;

typedef struct {
    DataType type;
} DataJumpTable;

typedef union {
    DataType type;
    DataBinary bin;
    DataHex hex;
    DataString str;
    DataJumpTable tbl;
} Data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

1 participant