-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfrser-cfg.h.example
50 lines (38 loc) · 2.08 KB
/
frser-cfg.h.example
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _FRSER_CFG_H_
#define _FRSER_CFG_H_
/* What kind of buses your flasher supports. I assume if it can LPC it can FWH too. */
/* You can override that with FORCE_BUSTYPE if you cant (weirdo hardware duuude :P) */
#define FRSER_FEAT_PARALLEL
#define FRSER_FEAT_LPCFWH
#define FRSER_FEAT_SPI
/* Debug feature, if you want to use get_last_op to know the last frser operation. */
#define FRSER_FEAT_LAST_OP
/* Safety feature, calls set_uart_timeout with a jmp_buf to longjmp to in case of timeout. */
#define FRSER_FEAT_UART_TIMEOUT
/* If your system is capable of autodetecting the actual attached chip bustype. */
#define FRSER_FEAT_DYNPROTO
/* If your system is capable of turning on/off chip drivers. */
#define FRSER_FEAT_PIN_STATE
/* If you have a debug console you'd want frser to call upon space bar. */
#define FRSER_FEAT_DBG_CONSOLE
/* Name provided to flashrom to identify what the thing is. Max 16 bytes */
#define FRSER_NAME "Example flasher"
/* Attached address lines, only if FRSER_FEAT_PARALLEL */
#define FRSER_PARALLEL_BITS 19
/* Ability to set SPI frequency (only if SPI). */
#define FRSER_FEAT_SPISPEED
/* Optionally, if you want to make the auto-OPBUF-sizing code leave more/less RAM space for
* rest of the system, define this. Default is below. Not needed for SPI-only flashers. */
//#define FRSER_SYS_BYTES 320
/* If you want to override the opbuf size completely, define this: */
//#define FRSER_OPBUF_LEN 1024
/* If you want to override the read-n max len (default based on BAUD or 64k), define this: */
//#define FRSER_READ_N_MAX (64*1024)
/* Hooks that are run (and only run) before and after the RECEIVE() for the operation. *
* Do not access any local variables in the frser_main function.
* I'd say that if you need to access eg. op you could save it in RECEIVE() and access
* that (your private copy) from the hook. */
/* These are only supported if you're using frser_main (or implement them in your own main()). */
//#define FRSER_FEAT_PRE_OPRX_HOOK() do { stuff(); other_stuff(); } while(0)
//#define FRSER_FEAT_POST_OPRX_HOOK() do { stuff(); other_stuff(); } while(0)
#endif