-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate the I2C chip_id map for AFC devices and RTM devices
Create different i2c_chip_mapping_t arrays and reserve chip_id numbers between 0 and 63 to AFC devices and between 64 and 127 to the RTM devices.
- Loading branch information
1 parent
7a91948
commit c8bbc04
Showing
9 changed files
with
63 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "i2c.h" | ||
#include "rtm_8sfp_i2c_mapping.h" | ||
#include "i2c_mapping.h" | ||
#include "port.h" | ||
|
||
i2c_chip_mapping_t i2c_chip_rtm_8sfp_map[I2C_CHIP_RTM_8SFP_CNT] = { | ||
[CHIP_ID_RTM_PCA9554 - 64] = { I2C_BUS_RTM_ID, 0x20 }, | ||
[CHIP_ID_RTM_EEPROM - 64] = { I2C_BUS_RTM_ID, 0x50 }, | ||
[CHIP_ID_RTM_LM75_0 - 64] = { I2C_BUS_RTM_ID, 0x48 }, | ||
[CHIP_ID_RTM_LM75_1 - 64] = { I2C_BUS_RTM_ID, 0x49 }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef RTM_8SFP_I2C_MAPPING_H_ | ||
#define RTM_8SFP_I2C_MAPPING_H_ | ||
|
||
#include "i2c.h" | ||
|
||
enum { | ||
CHIP_ID_RTM_PCA9554 = 64, | ||
CHIP_ID_RTM_EEPROM, | ||
CHIP_ID_RTM_LM75_0, | ||
CHIP_ID_RTM_LM75_1 | ||
}; | ||
|
||
#define I2C_CHIP_RTM_8SFP_CNT 4 | ||
|
||
extern i2c_chip_mapping_t i2c_chip_rtm_8sfp_map[I2C_CHIP_RTM_8SFP_CNT]; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters