Skip to content

Commit

Permalink
Support custom I2C address
Browse files Browse the repository at this point in the history
  • Loading branch information
torntrousers authored Nov 10, 2021
1 parent ee4523d commit 9e9cf8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sentence=Arduino Library for the Atmel/Microchip ECC508 and ECC608 crypto chips
paragraph=
category=Communication
url=https://github.com/arduino-libraries/ArduinoECCX08
architectures=samd,megaavr,mbed,mbed_nano,mbed_portenta
architectures=samd,megaavr,mbed,mbed_nano,mbed_portenta,esp32
includes=ArduinoECCX08.h
6 changes: 6 additions & 0 deletions src/ECCX08.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ ECCX08Class::~ECCX08Class()
{
}

int ECCX08Class::begin(uint8_t i2cAddress)
{
_address = i2cAddress;
return begin();
}

int ECCX08Class::begin()
{
_wire->begin();
Expand Down
1 change: 1 addition & 0 deletions src/ECCX08.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ECCX08Class
virtual ~ECCX08Class();

int begin();
int begin(uint8_t i2cAddress);
void end();

int serialNumber(byte sn[]);
Expand Down

0 comments on commit 9e9cf8f

Please sign in to comment.