Commit f67fc1c2 authored by Marc Schink's avatar Marc Schink

Python: Use the standard library enum type

parent f14c69b2
......@@ -17,14 +17,16 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
class LogLevel:
from enum import IntEnum, IntFlag
class LogLevel(IntEnum):
NONE = 0
ERROR = 1
WARNING = 2
INFO = 3
DEBUG = 4
class PacketType:
class PacketType(IntEnum):
UNKNOWN = 0
SYNC = 1
OF = 2
......@@ -41,22 +43,22 @@ class PacketType:
DWT_ADDR_OFFSET = 20
DWT_DATA_VALUE = 21
class LocalTimestampRelation:
class LocalTimestampRelation(IntEnum):
SYNC = 0
TS = 1
SRC = 2
BOTH = 3
class ExtensionSource:
class ExtensionSource(IntEnum):
ITM = 0
HW = 1
class ExceptionTraceFunction:
class ExceptionTraceFunction(IntEnum):
RESERVED = 0
ENTER = 1
EXIT = 2
RETURN = 3
class DecoderFlags:
class DecoderFlags(IntFlag):
NONE = 0
EOS = (1 << 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment