Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Struktura light_device_t
#include <
lights.h
>
Definicja w wierszu
176
pliku
lights.h
.
Ustaw światła na podane wartości.
Zwraca: 0 w przypadku powodzenia, kod błędu w przypadku niepowodzenia.
Definicja w wierszu
184
pliku
lights.h
.
Dokumentacja tego typu danych została wygenerowana z tego pliku:
-
hardware/libhardware/include/hardware/
lights.h
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: light_device_t Struct Reference\n\nlight_device_t Struct Reference\n===============================\n\n[Data Fields](#pub-attribs) \nlight_device_t Struct Reference \n\n`\n#include \u003c\n`[lights.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)`\n\u003e\n`\n\n|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| struct [hw_device_t](/reference/hal/structhw__device__t) | [common](/reference/hal/structlight__device__t#a86a0ca82dd3f02023e259b8b5e155dbe) |\n| ||\n| int(\\* | [set_light](/reference/hal/structlight__device__t#a37904fd5dd6c4ee9636a84c291208cdc) )(struct [light_device_t](/reference/hal/structlight__device__t) \\*dev, struct [light_state_t](/reference/hal/structlight__state__t) const \\*state) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nDefinition at line\n[176](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)\nof file\n[lights.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------------------------------------------------|\n| struct [hw_device_t](/reference/hal/structhw__device__t) common |\n\n\nDefinition at line\n[177](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)\nof file\n[lights.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)\n.\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* set_light)(struct [light_device_t](/reference/hal/structlight__device__t) \\*dev, struct [light_state_t](/reference/hal/structlight__state__t) const \\*state) |\n\n\nSet the provided lights to the provided values.\n\n\nReturns: 0 on succes, error code on failure.\n\n\nDefinition at line\n[184](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)\nof file\n[lights.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [lights.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/lights.h)"]]