-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathcdpump-v5.json
39 lines (33 loc) · 2.17 KB
/
cdpump-v5.json
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
{
"reg": {
// fmt: [c]: string, b: int8_t, B: uint8_t, h: int16_t, H: uint16_t, i: int32_t, I: uint32_t, f: float
// show: 0: normal, 1: hex, 2: bytes
"list": [
[ 0x0000, 2, "H", 1, "magic_code", "Magic code: 0xcdcd" ],
[ 0x0002, 2, "H", 1, "conf_ver", "Config version" ],
[ 0x0004, 1, "B", 1, "conf_from", "0: default config, 1: load from flash" ],
[ 0x0005, 1, "b", 0, "do_reboot", "1: reboot to bl, 2: reboot to app" ],
[ 0x0007, 1, "b", 0, "save_conf", "Write 1 to save current config to flash" ],
[ 0x000c, 1, "B", 1, "bus_cfg_mac", "RS-485 port id, range: 0~254" ],
[ 0x0010, 4, "I", 0, "bus_cfg_baud_l", "RS-485 baud rate for first byte" ],
[ 0x0014, 4, "I", 0, "bus_cfg_baud_h", "RS-485 baud rate for follow bytes" ],
[ 0x0018, 2, "[B]", 1, "bus_cfg_filter", "Multicast address" ],
[ 0x001a, 1, "B", 0, "bus_cfg_mode", "0: Arbitration, 1: Break Sync" ],
[ 0x001c, 2, "H", 0, "bus_cfg_tx_permit_len", "Allow send wait time" ],
[ 0x001e, 2, "H", 0, "bus_cfg_max_idle_len", "Max idle wait time for BS mode" ],
[ 0x0020, 1, "B", 0, "bus_cfg_tx_pre_len", " Active TX_EN before TX" ],
[ 0x0024, 1, "b", 0, "dbg_en", "1: Report debug message to host, 0: do not report" ],
[ 0x0026, 3, "[B]", 2, "dbg_dst_addr", "Send debug message to this address" ],
[ 0x002a, 2, "H", 1, "dbg_dst_port", "Send debug message to this port" ],
// --------------- Follows are not writable: -------------------
[ 0x0036, 1, "B", 0, "gpo_pins", "GPIO output pins" ],
],
// button groups
"reg_r": [["magic_code","save_conf"],["bus_cfg_mac","bus_cfg_tx_pre_len"],["dbg_en","dbg_dst_port"]],
"reg_w": [["magic_code","conf_ver"],["do_reboot"],["save_conf"],["bus_cfg_mac"],["bus_cfg_baud_l","bus_cfg_baud_h"],
["bus_cfg_filter","bus_cfg_tx_pre_len"],["dbg_en"],["dbg_dst_addr","dbg_dst_port"]],
"less_r": [],
"less_w": []
},
"iap": { "reboot": 0x0005, "keep_bl": 0x0006 } // iap related register address
}