- Fix MockGpiod object: This class should mock the gpiod module, but it was
missing the LINE_REQ_EV_FALLING_EDGE attribute.
- While we're at it, fix some pylint warnings.
This is a class that allows handling compat numbers as a type:
>>> cn = CompatNumber(4, 3)
>>> print(cn.major)
4
>>> cn < CompatNumber(4, 5)
True
>>> cn == CompatNumber(4.3)
True
This adds a new Gpio helper class, which uses libgpiod under the
hood instead of the deprecated sysfs GPIO access. This class provides
the ability to get/set a specific GPIO, which is looked up by name.
When ENABLE_SIM and ENABLE_PYTHON_API are set, this commit embeds MPM
(Built with -DMPM_DEVICE=sim) into the pyuhd package.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
When making context managers in Python, the yield statement has to be wrapped in a try/finally clause in order to properly clean up after exceptions happen.
Pull some general functionality out of a specific test case and create
a TestBase class. Future test cases will inherit from TestBase and have
access to this general functionality.
Add unit testing framework to MPM which can be run by calling
"make test". The testing is done using the built in unittest Python
module. Tests can be run on a dev machine or on the USRP itself when
compiling natively.