Skip to content

Commit 005ff43

Browse files
committed
Added support for SZP
1 parent f85ba89 commit 005ff43

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/BoardType.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ enum class BoardId : unsigned int
228228
tool1lc_v0 = 0,
229229
exp1hce_v0,
230230
ate,
231+
szp,
231232
exp1xd_v0,
232233
tool1lc_v1,
233234

@@ -243,6 +244,7 @@ constexpr const char * BoardTypeNames[] =
243244
"TOOL1LC", // version 1.0 or earlier
244245
"EXP1HCE",
245246
"unknown", // for ATE we need to look at the second board type pin
247+
"SZP",
246248
"EXP1XD",
247249
"TOOL1LC", // version 1.1 or later
248250

@@ -257,6 +259,7 @@ constexpr unsigned int BoardTypeVersions[] =
257259
0,
258260
0,
259261
0,
262+
0,
260263
1,
261264
0,
262265
0
@@ -267,6 +270,7 @@ constexpr const Pin *LedPinsTables[] =
267270
LedPins_Tool1LC_v0,
268271
LedPins_Exp1HCE,
269272
LedPins_Ate,
273+
LedPins_SZP,
270274
LedPins_Exp1XD,
271275
LedPins_Tool1LC_v1,
272276
LedPins_Ate,
@@ -278,6 +282,7 @@ constexpr bool LedActiveHigh[] =
278282
LedActiveHigh_Tool1LC_v0,
279283
LedActiveHigh_Exp1HCE,
280284
LedActiveHigh_Ate,
285+
LedActiveHigh_SZP,
281286
LedActiveHigh_Exp1XD,
282287
LedActiveHigh_Tool1LC_v1,
283288
LedActiveHigh_Ate,
@@ -289,6 +294,7 @@ constexpr Pin CanResetPins[] =
289294
CanResetPin_Tool1LC,
290295
CanResetPin_Exp1HCE,
291296
NoPin,
297+
CanResetPin_SZP,
292298
CanResetPin_Exp1XD,
293299
CanResetPin_Tool1LC,
294300
CanResetPin_AteCM,
@@ -301,6 +307,7 @@ constexpr float BoardTypeFractions[] =
301307
1.0/(1.0 + 10.0), // TOOL1LC v1.0 has 1K lower resistor, 10K upper
302308
4.7/(4.7 + 27.0), // EXP1HCE has 4K7 lower resistor, 27K upper
303309
3.0/(3.0 + 12.0), // ATECM and ATEIO have 3K lower, 12K upper
310+
4.7/(4.7 + 10.0), // SZP has 4K7 lower, 10K upper
304311
4.7/(4.7 + 4.7), // EXP1XD has 4K7 lower resistor, 4K7 upper
305312
10.0/(1.0 + 10.0), // TOOL1LC v1.1 has 10K lower resistor, 1K upper
306313
};
@@ -313,7 +320,8 @@ constexpr uint16_t BoardIdDecisionPoints[] =
313320
(uint16_t)((BoardTypeFractions[0] + BoardTypeFractions[1]) * (AdcRange/2)),
314321
(uint16_t)((BoardTypeFractions[1] + BoardTypeFractions[2]) * (AdcRange/2)),
315322
(uint16_t)((BoardTypeFractions[2] + BoardTypeFractions[3]) * (AdcRange/2)),
316-
(uint16_t)((BoardTypeFractions[3] + BoardTypeFractions[4]) * (AdcRange/2))
323+
(uint16_t)((BoardTypeFractions[3] + BoardTypeFractions[4]) * (AdcRange/2)),
324+
(uint16_t)((BoardTypeFractions[4] + BoardTypeFractions[5]) * (AdcRange/2))
317325
};
318326

319327
static_assert(ARRAY_SIZE(BoardIdDecisionPoints) + 1 == ARRAY_SIZE(BoardTypeFractions));

src/Config/SAMC21config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ constexpr Pin OutPins_Tool1LC[] = { PortAPin(11), PortAPin(10), PortBPin(11) };
3636
constexpr Pin ButtonPins_Tool1LC[] = { PortBPin(22), PortBPin(23) };
3737

3838
constexpr Pin CanResetPin_Tool1LC = PortBPin(22); // first button pin
39+
constexpr Pin CanResetPin_SZP = PortAPin(18);
3940
constexpr Pin CanResetPin_Exp1XD = PortAPin(27);
4041
constexpr Pin CanResetPin_Exp1HCE = NoPin;
4142
constexpr Pin CanResetPin_AteCM = NoPin; // the CAN jumper on the ATECM is connected between AteCmJumperPin and AteCmZeroPin
@@ -62,6 +63,9 @@ constexpr bool LedActiveHigh_Tool1LC_v0 = true;
6263
constexpr Pin LedPins_Tool1LC_v1[NumLedPins] = { PortAPin(30), PortAPin(31) };
6364
constexpr bool LedActiveHigh_Tool1LC_v1 = false;
6465

66+
constexpr Pin LedPins_SZP[NumLedPins] = { PortAPin(30), PortAPin(31) };
67+
constexpr bool LedActiveHigh_SZP = false;
68+
6569
constexpr Pin LedPins_Exp1XD[NumLedPins] = { PortAPin(19), PortAPin(18) };
6670
constexpr bool LedActiveHigh_Exp1XD = true;
6771

src/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
#ifndef SRC_VERSION_H_
99
#define SRC_VERSION_H_
1010

11-
#define VERSION_TEXT "2.7 (2023-06-21)"
11+
#define VERSION_TEXT "2.8 (2023-07-25)"
1212

1313
#endif /* SRC_VERSION_H_ */

0 commit comments

Comments
 (0)