Skip to content

cache board model during initialization #196

Closed
@pdp7

Description

@pdp7

While investigating #190, I realized it is very inefficient to check for board type inside gpio_set_value():
https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/source/event_gpio.c#L405

The function beaglebone_blue() executes popen() to run grep:
https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/source/common.c#L602

This should be cached so that it only needs to be done once when Adafruit_BBIO is initialized.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions