Skip to content

Commit 9b62112

Browse files
authored
Update atecc608_handler.cpp
1 parent 9dc291d commit 9b62112

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/atecc608_handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ int write_key_slot(uint8_t key, uint8_t *datakey, size_t len)
122122
* \param[in] i2cAddr i2c address of the slave chip
123123
* \return ATCA_SUCCESS on success, otherwise an error code.
124124
*/
125-
int atecc_handler_init(int i2cAddr){
125+
int atecc_handler_init(int i2cAddr, int bus = 1){
126126
// Init the constuctor for the library
127127
cfg.iface_type = ATCA_I2C_IFACE; // Type of communication -> I2C mode
128128
cfg.devtype = ATECC608B; // Type of chip
129129
cfg.atcai2c.address = i2cAddr; // I2C address of Adafruit device
130-
cfg.atcai2c.bus = 1;
130+
cfg.atcai2c.bus = bus;
131131
// cfg.atcai2c.baud = 400000;
132132
cfg.atcai2c.baud = 100000;
133133
cfg.wake_delay = 1500; // Delay of wake up (1500 ms)

0 commit comments

Comments
 (0)