27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
sensors_module_t Yapı Referansı
#include <
sensors.h
>
Her donanım modülünde HAL_MODULE_INFO_SYM adlı bir veri yapısı olmalıdır ve bu veri yapısının alanları,
hw_module_t
ile başlamalı ve ardından modüle özgü bilgiler gelmelidir.
Tanımı,
sensors.h
dosyasının
1149
satırındadır.
Mevcut tüm sensörleri listeleyin. Liste "list" olarak döndürülür.
-
İlerlemeler
-
listedeki sensör sayısı
Tanım,
sensors.h
dosyasının
1156
satırı
int(* set_operation_mode)(unsigned int mode)
|
Modülü belirli bir moda yerleştirin. Aşağıdaki modlar tanımlanır:
0: Normal çalışma. Modülün varsayılan durumu. 1 - Loopback modu. Bu modda, sensör hizmeti tarafından desteklenen sensörler için veriler eklenir.
-
İlerlemeler
-
0 (başarılıysa) - istenen mod desteklenmiyorsa EINVAL - işleme izin verilmiyorsa EPERM
Tanımı,
sensors.h
dosyasının
1169
satırı
Bu yapının dokümanları aşağıdaki dosyadan oluşturulmuştur:
-
hardware/libhardware/include/hardware/
sensors.h
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: sensors_module_t Struct Reference\n\nsensors_module_t Struct Reference\n=================================\n\n[Data Fields](#pub-attribs) \nsensors_module_t Struct Reference \n\n`\n#include \u003c\n`[sensors.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)`\n\u003e\n`\n\n|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| struct [hw_module_t](/reference/hal/structhw__module__t) | [common](/reference/hal/structsensors__module__t#a71ea01183b3998cad6a2301a37a42fc7) |\n| ||\n| int(\\* | [get_sensors_list](/reference/hal/structsensors__module__t#aa9546f8477ee959716aa78e849a2c51b) )(struct [sensors_module_t](/reference/hal/structsensors__module__t) \\*module, struct [sensor_t](/reference/hal/structsensor__t) const \\*\\*list) |\n| ||\n| int(\\* | [set_operation_mode](/reference/hal/structsensors__module__t#a495cc50ac138223c6f32006810c1a8ca) )(unsigned int mode) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nEvery hardware module must have a data structure named HAL_MODULE_INFO_SYM and the fields of this data structure must begin with\n[hw_module_t](/reference/hal/structhw__module__t)\nfollowed by module specific information.\n\n\nDefinition at line\n[1149](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\nof file\n[sensors.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------------------------------------------------|\n| struct [hw_module_t](/reference/hal/structhw__module__t) common |\n\n\nDefinition at line\n[1150](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\nof file\n[sensors.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\n.\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* get_sensors_list)(struct [sensors_module_t](/reference/hal/structsensors__module__t) \\*module, struct [sensor_t](/reference/hal/structsensor__t) const \\*\\*list) |\n\n\nEnumerate all available sensors. The list is returned in \"list\".\n\n\nReturns\n:\n number of sensors in the list\n\n\nDefinition at line\n[1156](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\nof file\n[sensors.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\n.\n\n|-----------------------------------------------|\n| int(\\* set_operation_mode)(unsigned int mode) |\n\n\nPlace the module in a specific mode. The following modes are defined\n\n\n0 - Normal operation. Default state of the module. 1 - Loopback mode. Data is injected for the supported sensors by the sensor service in this mode.\n\n\nReturns\n:\n 0 on success -EINVAL if requested mode is not supported -EPERM if operation is not allowed\n\n\nDefinition at line\n[1169](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\nof file\n[sensors.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [sensors.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h)"]]