À partir du 27 mars 2025, nous vous recommandons d'utiliser android-latest-release
au lieu de aosp-main
pour créer et contribuer à AOSP. Pour en savoir plus, consultez la section Modifications apportées à AOSP.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Documentation de référence sur la struct light_device_t
#include <
lights.h
>
Définition à la ligne
176
du fichier
lights.h
.
Définissez les lumières fournies sur les valeurs fournies.
Renvoie: 0 en cas de succès, code d'erreur en cas d'échec.
Définition à la ligne
184
du fichier
lights.h
.
La documentation de ce struct a été générée à partir du fichier suivant :
-
hardware/libhardware/include/hardware/
lights.h
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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)"]]