zephyr/scripts/dts/python-devicetree
Martí Bolívar 74f95688d9 dtlib: add Type enum
Instead of hard-coding constants, use an IntEnum.

These is still a subclass of 'int', but is both easier to import and
easier to read during debugging.

For example, compare:

>>> Type.BYTES
<Type.BYTES: 1>

with:

>>> TYPE_BYTES
1

However, 'Type.BYTES == 1' is still True, and the enum values
otherwise behave like you would expect.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-22 15:32:10 +02:00
..
src/devicetree dtlib: add Type enum 2021-04-22 15:32:10 +02:00
tests dtlib: add Type enum 2021-04-22 15:32:10 +02:00
.gitignore
requirements.txt
setup.py
tox.ini