Created
August 21, 2015 13:04
-
-
Save tatey/ab12fb587326283826b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Type : UInt16 | |
DeviceGetService = 2 | |
DeviceStateService | |
DeviceGetPower = 20 | |
DeviceSetPower | |
DeviceStatePower | |
def c_struct | |
{% if true %} | |
case self | |
{% for value in @constants %} | |
when {{value}} | |
C::LX{{value}} | |
{% end %} | |
end | |
{% end %} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias LXDeviceGetPower = Nil | |
@[Packed] | |
struct LXDeviceStateService | |
service : UInt8 | |
port : UInt32 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment