Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not set atcai2c.bus = 1 when bus is specified #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/examples/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ def configure_device(iface='hid', device='ecc', i2c_addr=None, keygen=True, **kw
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/create_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ def info(iface='hid', device='ecc', **kwargs):
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/ecdh.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def ECDH(slot, iface='hid', **kwargs):


# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ def info(iface='hid', device='ecc', **kwargs):
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/key_attestation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ def init_device(iface='hid', **kwargs):
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/read_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def read_write(iface='hid', device='ecc', **kwargs):
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/sign_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def init_device(iface='hid', slot=0, **kwargs):
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down
5 changes: 3 additions & 2 deletions python/examples/tng_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def init_device(iface='hid', **kwargs):
setattr(icfg, k, int(v, 16))

# Basic Raspberry Pi I2C check
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1
if 'bus' not in kwargs:
if 'i2c' == iface and check_if_rpi():
cfg.cfg.atcai2c.bus = 1

# Initialize the stack
assert atcab_init(cfg) == ATCA_SUCCESS
Expand Down