Lines Matching defs:devices
47 struct Devices {
67 Devices* devices;
69 devices = (Devices*)malloc(sizeof(Devices));
73 devices->lights[LIGHT_INDEX_BACKLIGHT]
75 devices->lights[LIGHT_INDEX_KEYBOARD]
77 devices->lights[LIGHT_INDEX_BUTTONS]
79 devices->lights[LIGHT_INDEX_BATTERY]
81 devices->lights[LIGHT_INDEX_NOTIFICATIONS]
83 devices->lights[LIGHT_INDEX_ATTENTION]
85 devices->lights[LIGHT_INDEX_BLUETOOTH]
87 devices->lights[LIGHT_INDEX_WIFI]
90 memset(devices, 0, sizeof(Devices));
93 return (jint)devices;
98 Devices* devices = (Devices*)ptr;
99 if (devices == NULL) {
103 free(devices);
109 Devices* devices = (Devices*)ptr;
112 if (light < 0 || light >= LIGHT_COUNT || devices->lights[light] == NULL) {
125 devices->lights[light]->set_light(devices->lights[light], &state);