5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
24 int getEEpromSize(BoardEnum board
)
33 return EESIZE_GRUVIN9X
;
39 case BOARD_TARANIS_X7
:
40 case BOARD_TARANIS_X9D
:
41 case BOARD_TARANIS_X9DP
:
42 case BOARD_TARANIS_X9E
:
44 return EESIZE_TARANIS
;
46 return 0; // unlimited
50 SwitchInfo
getSwitchInfo(BoardEnum board
, unsigned index
)
52 if (IS_TARANIS_X7(board
)) {
53 const SwitchInfo switches
[] = {{SWITCH_3POS
, "SA"},
58 {SWITCH_TOGGLE
, "SH"}};
59 if (index
< DIM(switches
))
60 return switches
[index
];
62 else if (IS_HORUS_OR_TARANIS(board
)) {
63 const SwitchInfo switches
[] = {{SWITCH_3POS
, "SA"},
70 {SWITCH_TOGGLE
, "SH"},
81 if (index
< DIM(switches
))
82 return switches
[index
];
85 const SwitchInfo switches
[] = {{SWITCH_2POS
, "THR"},
88 {SWITCH_3POS
, "3POS"},
91 {SWITCH_TOGGLE
, "TRN"}};
92 if (index
< DIM(switches
))
93 return switches
[index
];
96 return {SWITCH_NOT_AVAILABLE
, "???"};