mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-17 21:32:52 +01:00
Add support for TPS546D24S DEVICE_ID (#355)
TPS546D24S is a drop in replacement for the TPS546D24A, but it has a different DEVICE_ID we need to check for.
This commit is contained in:
parent
68235d2736
commit
b817e305b6
@ -22,8 +22,9 @@
|
||||
|
||||
static const char *TAG = "TPS546.c";
|
||||
|
||||
static uint8_t DEVICE_ID1[] = {0x54, 0x49, 0x54, 0x6B, 0x24, 0x41};
|
||||
static uint8_t DEVICE_ID2[] = {0x54, 0x49, 0x54, 0x6D, 0x24, 0x41};
|
||||
static uint8_t DEVICE_ID1[] = {0x54, 0x49, 0x54, 0x6B, 0x24, 0x41}; // TPS546D24A
|
||||
static uint8_t DEVICE_ID2[] = {0x54, 0x49, 0x54, 0x6D, 0x24, 0x41}; // TPS546D24A
|
||||
static uint8_t DEVICE_ID3[] = {0x54, 0x49, 0x54, 0x6D, 0x24, 0x62}; // TPS546D24S
|
||||
static uint8_t MFR_ID[] = {'B', 'A', 'X'};
|
||||
static uint8_t MFR_MODEL[] = {'H', 'E', 'X'};
|
||||
static uint8_t MFR_REVISION[] = {0x00, 0x00, 0x01};
|
||||
@ -374,8 +375,8 @@ int TPS546_init(void)
|
||||
smb_read_block(PMBUS_IC_DEVICE_ID, data, 6);
|
||||
ESP_LOGI(TAG, "Device ID: %02x %02x %02x %02x %02x %02x", data[0], data[1],
|
||||
data[2], data[3], data[4], data[5]);
|
||||
/* There's two different known device IDs observed so far */
|
||||
if ( (memcmp(data, DEVICE_ID1, 6) != 0) && (memcmp(data, DEVICE_ID2, 6) != 0) )
|
||||
/* There's 3 different known device IDs observed so far */
|
||||
if ( (memcmp(data, DEVICE_ID1, 6) != 0) && (memcmp(data, DEVICE_ID2, 6) != 0) && (memcmp(data, DEVICE_ID3, 6) != 0))
|
||||
{
|
||||
ESP_LOGI(TAG, "ERROR- cannot find TPS546 regulator");
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user