Skip to content

Instantly share code, notes, and snippets.

@tatey
Created August 21, 2015 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tatey/ab12fb587326283826b6 to your computer and use it in GitHub Desktop.
Save tatey/ab12fb587326283826b6 to your computer and use it in GitHub Desktop.
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
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