forked from achamaikin/CCSModuleSW30Web
Clamp connector current from InfoBlock connector1CurrentLimitA (v1.0.36).
This commit is contained in:
+12
-6
@@ -44,12 +44,18 @@ uint8_t IN_ReadInput(inputNum_t input_n);
|
||||
#define VERSION_OFFSET (0x1E4)
|
||||
|
||||
typedef struct __attribute__((packed)) {
|
||||
uint32_t serialNumber; // Байты 0-3: серийный номер станции (little-endian)
|
||||
uint8_t stationType; // Байт 4: тип станции
|
||||
uint8_t boardVersion; // Байт 5: версия платы
|
||||
uint8_t addrEdcan; // Байт 6: адрес EDCAN
|
||||
uint8_t maxPower; // Байт 7: максимальная мощность станции (5кВт/bit)
|
||||
uint8_t reserved[56]; // Байты 8-63: зарезервированы
|
||||
uint32_t serialNumber; // Байты 0-3
|
||||
uint8_t stationType; // Байт 4
|
||||
uint8_t boardVersion; // Байт 5
|
||||
uint8_t addrEdcan; // Байт 6
|
||||
uint8_t maxPower; // Байт 7
|
||||
uint8_t pad[7]; // bytes 8-14, see edcan.h
|
||||
uint16_t connector1CurrentLimitA; // Байты 15-16, A; 0 = legacy PSU_MAX_CURRENT
|
||||
uint8_t reserved[45]; // Байты 17-63
|
||||
} InfoBlock_t;
|
||||
|
||||
extern InfoBlock_t *InfoBlock;
|
||||
|
||||
void Board_LoadInfoBlockLimits(void);
|
||||
uint16_t Board_GetConnectorCurrentLimit_0p1A(void);
|
||||
uint16_t Board_ClampCurrent_0p1A(uint16_t current_0p1A);
|
||||
|
||||
Reference in New Issue
Block a user