Skip to content

Commit 9e9cf8f

Browse files
authored
Support custom I2C address
1 parent ee4523d commit 9e9cf8f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ sentence=Arduino Library for the Atmel/Microchip ECC508 and ECC608 crypto chips
66
paragraph=
77
category=Communication
88
url=https://github.com/arduino-libraries/ArduinoECCX08
9-
architectures=samd,megaavr,mbed,mbed_nano,mbed_portenta
9+
architectures=samd,megaavr,mbed,mbed_nano,mbed_portenta,esp32
1010
includes=ArduinoECCX08.h

src/ECCX08.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ ECCX08Class::~ECCX08Class()
3838
{
3939
}
4040

41+
int ECCX08Class::begin(uint8_t i2cAddress)
42+
{
43+
_address = i2cAddress;
44+
return begin();
45+
}
46+
4147
int ECCX08Class::begin()
4248
{
4349
_wire->begin();

src/ECCX08.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ECCX08Class
3030
virtual ~ECCX08Class();
3131

3232
int begin();
33+
int begin(uint8_t i2cAddress);
3334
void end();
3435

3536
int serialNumber(byte sn[]);

0 commit comments

Comments
 (0)