firmware_TouchpadMTB: refactor the firmware constant module
The firmware constants were originally included into the global space
using execfile. However, neither execfile nor import * is encouraged.
In this CL, a major refactoring is done to classify constants into
different classes in the constant module. Other modules can import
only those constant classes that are required.
In addition, if there is any attempt to modify those constants, it
would be caught as an AttributeError exception.
BUG=chromium-os:35024
TEST=Run the following command in a chromebook.
$ DISPLAY=:0 OPTIONS=-s sudo python main.py
It should execute normally.
Change-Id: I815c601d3eda4729a0783aa3620b5902e2b81621
Reviewed-on: https://gerrit.chromium.org/gerrit/36765
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
13 files changed