FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/fchg/bsim_etm_cmd.h @ 256:aec644728174
FCHG BSIM: ETM connection implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 13 May 2021 02:37:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
255:1a4413c4eb7e | 256:aec644728174 |
---|---|
1 /* | |
2 * This header file defines ETM commands that can be sent from a | |
3 * development host to FCHG operating in BSIM mode. | |
4 */ | |
5 | |
6 #ifndef __BSIM_ETM_CMD_H | |
7 #define __BSIM_ETM_CMD_H | |
8 | |
9 /* ETM_BSIM command opcodes */ | |
10 #define BSIM_CMD_QUERY 0x00 | |
11 #define BSIM_CMD_DISCHARGE 0x01 /* 1 byte with battery % follows */ | |
12 #define BSIM_CMD_CHG_START 0x02 | |
13 #define BSIM_CMD_CHG_CI2CV 0x03 | |
14 #define BSIM_CMD_CHG_COMPLETE 0x04 | |
15 #define BSIM_CMD_SET_ICHG 0x05 /* 2 bytes of Ichg value follow */ | |
16 #define BSIM_CMD_START_ENABLE 0x06 /* 1 byte with flag follows */ | |
17 | |
18 /* status response codes */ | |
19 #define BSIM_STAT_OK 0x00 | |
20 #define BSIM_ERR_BAD_CMD 0x02 | |
21 #define BSIM_ERR_WRONG_STATE 0x03 | |
22 #define BSIM_ERR_INV_PERCENT 0x04 | |
23 #define BSIM_ERR_INV_DISCHARGE 0x05 | |
24 | |
25 #endif /* include guard */ |