summaryrefslogtreecommitdiffstats
path: root/src/cal.h
blob: e87b8dc99211960ad2c6001e96ee7a209f7f1082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
    0xFFFF - Open Free Fiasco Firmware Flasher
    Copyright (c) 2011  Michael Buesch <mb@bu3sch.de>
    Copyright (C) 2012  Pali Rohár <pali.rohar@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

#ifndef CAL_H
#define CAL_H

#define CAL_MAX_NAME_LEN	16
#define CAL_FLAG_USER		0x0001
#define CAL_FLAG_WRITE_ONCE	0x0002

struct cal;

int cal_init(struct cal ** cal_out);
int cal_init_file(const char * file, struct cal ** cal_out);
void cal_finish(struct cal * cal);
int cal_read_block(struct cal * cal, const char * name, void ** ptr, unsigned long * len, unsigned long flags);

#endif