Refactor LED packet constructor
This commit is contained in:
+15
-2
@@ -61,6 +61,19 @@ set_sdk_connection_req_new (
|
||||
const Message
|
||||
set_system_led_req_new (
|
||||
Client session,
|
||||
struct SetSystemLedReq* msg ) {
|
||||
return message_new(session, 0x3F, SET_SYSTEM_LED_CMDID, sizeof(struct SetSystemLedReq), msg);
|
||||
uint8_t red,
|
||||
uint8_t green,
|
||||
uint8_t blue,
|
||||
enum LEDCOMP comp,
|
||||
uint16_t led_mask,
|
||||
enum LEDEFFECT effect,
|
||||
uint16_t t1,
|
||||
uint16_t t2 ) {
|
||||
const struct SetSystemLedReq msg = {
|
||||
comp, led_mask,
|
||||
{ effect, 7 },
|
||||
red, green, blue,
|
||||
0, t1, t2
|
||||
};
|
||||
return message_new(session, 0x3F, SET_SYSTEM_LED_CMDID, sizeof(msg), &msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user