commit | 74f95688d9741324a8889f6dbcb4b1e4b2eaf4ee | [log] [tgz] |
---|---|---|
author | Martí Bolívar <marti.bolivar@nordicsemi.no> | Tue Apr 13 13:26:08 2021 -0700 |
committer | Carles Cufí <carles.cufi@nordicsemi.no> | Thu Apr 22 15:32:10 2021 +0200 |
tree | 2efa631d8e016fa0862aea4dd8b2e44609b5dc2a | |
parent | 9a85a89313b18fbfed2e966ff62f8efaea3f4b7f [diff] |
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>