2023-06-26 11:44:57 -07:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause-Views
|
2020-10-04 00:56:06 -07:00
|
|
|
/*
|
2023-06-26 11:44:57 -07:00
|
|
|
* Copyright (c) 2020-2023 The Regents of the University of California
|
|
|
|
*/
|
2020-10-04 00:56:06 -07:00
|
|
|
|
|
|
|
#ifndef BITFILE_H
|
|
|
|
#define BITFILE_H
|
|
|
|
|
|
|
|
struct bitfile {
|
|
|
|
char *header;
|
|
|
|
char *name;
|
|
|
|
char *part;
|
|
|
|
char *date;
|
|
|
|
char *time;
|
|
|
|
|
|
|
|
size_t data_len;
|
|
|
|
char *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct bitfile *bitfile_create_from_file(const char *bit_file_name);
|
|
|
|
|
|
|
|
struct bitfile *bitfile_create_from_buffer(char *buffer, size_t len);
|
|
|
|
|
|
|
|
int bitfile_parse(struct bitfile *bf, char *buffer, size_t len);
|
|
|
|
|
|
|
|
void bitfile_close(struct bitfile *bf);
|
|
|
|
|
|
|
|
#endif // BITFILE_H
|