• Home
Name Date Size #Lines LOC

..--

audio/12-May-2024-79,32061,076

base/12-May-2024-224178

battery/12-May-2024-5,2354,123

bluetooth/12-May-2024-11,7879,176

camera/12-May-2024-89,36068,055

clearplay/12-May-2024-5,1453,732

codec/12-May-2024-55,33442,994

connected_nfc_tag/12-May-2024-316230

display/12-May-2024-38,94828,943

distributed_audio/12-May-2024-12,0368,234

distributed_camera/12-May-2024-15,42410,905

face_auth/12-May-2024-2,1701,554

fingerprint_auth/12-May-2024-2,0941,501

format/12-May-2024-1,858851

huks/12-May-2024-3,2692,177

input/12-May-2024-14,58910,504

intelligent_voice/12-May-2024-2,9282,164

light/12-May-2024-4,6033,112

location/12-May-2024-2,6201,897

memorytracker/12-May-2024-470350

motion/12-May-2024-1,5961,155

nfc/12-May-2024-1,163930

partitionslot/12-May-2024-710539

pin_auth/12-May-2024-9,5406,902

power/12-May-2024-3,3302,439

ril/12-May-2024-1,4381,147

secure_element/12-May-2024-1,115844

sensor/12-May-2024-14,02510,127

thermal/12-May-2024-4,4483,444

usb/12-May-2024-82,34361,205

user_auth/12-May-2024-18,89515,018

vibrator/12-May-2024-6,6264,446

wlan/12-May-2024-33,56626,624

.clang-formatD12-May-2024892 2928

.gitignoreD12-May-202427 65

LICENSED12-May-202412.5 KiB229195

OAT.xmlD12-May-20248.2 KiB10863

README.mdD12-May-20244.2 KiB3724

README_zh.mdD12-May-20243.2 KiB4124

README.md

1# Peripheral<a name="EN-US_TOPIC_0000001101652164"></a>
2
3-   [Introduction](#section11660541593)
4-   [Directory Structure](#section161941989596)
5-   [Repositories Involved](#section1371113476307)
6
7## Introduction<a name="section11660541593"></a>
8
9This repository stores the hardware driver interfaces \(HDIs\), hardware abstraction layer \(HAL\) implementation, driver models, and test cases related to drivers of peripherals. The directory is structured based on the driver modules. For details about each driver module, see the readme file in the sub-directory of each module.
10
11## Directory Structure<a name="section161941989596"></a>
12
13The code directory of this repository is  **/drivers/peripheral**, which contains the following sub-directories:
14
15-   **audio**: This sub-directory stores definitions of audio HDIs that can be used to manage loading and unloading of sound card drivers, create audio renderers and capturers, select an audio scene, set audio properties, set the audio volume, and start or stop audio playback and recording. For details, see the [readme](audio/README.md) file in the  **audio**  sub-directory.
16-   **codec**: This sub-directory stores definitions of codec HDIs, which allow upper-layer services to perform media codec-related operations. For details, see the [readme](codec/README.md) file in the  **codec**  sub-directory.
17-   **display**: This sub-directory stores definitions of display HDIs and their default implementations. These HDIs allow upper-layer graphics services to manage display layers, manage memory of the display module, and implement hardware acceleration. For details, see the [readme](display/README.md) file in the  **display**  sub-directory.
18
19-   **format**: This sub-directory stores definitions of format HDIs, allowing upper-layer services to multiplex and demultiplex media files. For details, see the [readme](format/README.md) file in the  **format**  sub-directory.
20-   **input**: This sub-directory stores definitions and implementation code of input HDIs, allowing upper-layer input services to perform operations for input devices, including managing input devices, controlling service flows, and reporting input events. For details, see the [readme](input/README.md) file in the  **input**  sub-directory.
21-   **sensor**: This sub-directory stores definitions and implementation code of sensor HDIs, including obtaining sensor information, enabling or disabling a sensor, subscribing to or unsubscribing from sensor data, and setting sensor options. For details, see the [readme](sensor/README.md) file in the  **sensor**  sub-directory.
22-   **wlan**: This sub-directory stores definitions and implementation code of WLAN HDIs, including creating and stopping a channel between the HAL and the WLAN driver and obtaining the WLAN features supported by the device. For details, see the [readme](wlan/README.md) file in the  **wlan**  sub-directory.
23-   **usb**: This sub-directory stores definitions and implementation code of the USB DDK, including device management, device configuration, and data read/write on the USB host and USB devices. For details, see the [readme](usb/README.md) file in the **usb** sub-directory.
24-   **camera**: This sub-directory stores definitions and implementation code of camera HDIs, including HDI implementation for the upper-layer camera service and management of camera hardware devices. For details, see the README file in the **camera** sub-directory.
25-   **ril**: This sub-directory stores definitions and implementation code of Ril HDIs, including service processing capabilities related to the call, SIM card, SMS/MMS, radio, and cellular data services. For details, see the [readme](ril/README.md) file in the **ril** sub-directory.
26## Repositories Involved<a name="section1371113476307"></a>
27
28[Driver subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/driver.md)
29
30[drivers\_framework](https://gitee.com/openharmony/drivers_framework/blob/master/README.md)
31
32[drivers\_adapter](https://gitee.com/openharmony/drivers_adapter/blob/master/README.md)
33
34[drivers\_adapter\_khdf\_linux](https://gitee.com/openharmony/drivers_adapter_khdf_linux/blob/master/README.md)
35
36[drivers\_peripheral](https://gitee.com/openharmony/drivers_peripheral)
37

README_zh.md

1# peripheral<a name="ZH-CN_TOPIC_0000001101652164"></a>
2
3-   [简介](#section11660541593)
4-   [目录](#section161941989596)
5-   [相关仓](#section1371113476307)
6
7## 简介<a name="section11660541593"></a>
8
9此仓主要包含各外设器件驱动相关的HDI(Hardware Driver Interface)接口、HAL实现、驱动模型及测试用例等,根据模块划分不同目录,具体模块的相关信息可参阅各模块子目录下的readme。
10
11## 目录<a name="section161941989596"></a>
12
13该仓代码目录为 /drivers/peripheral,其中包含的各子目录简介如下。
14
15-   audio:Audio HDI接口的定义,用于管理声卡驱动的加载和卸载、创建音频播放对象及录音对象、选择音频场景、设置音频属性及音量、控制音频播放及录音的启停等,详见audio目录下的[readme](audio/README_zh.md)文档。
16-   codec:Codec HDI接口的定义,这些接口对上层服务提供媒体编解码的驱动能力,详见codec目录下的[readme](codec/README_zh.md)文档。
17-   display:Display HDI 接口定义及其默认实现,对上层图形服务提供显示驱动能力,包括显示图层的管理、显示内存的管理及硬件图形加速,详见display目录下的[readme](display/README_zh.md)文档。
18
19-   format:Format HDI接口定义,此类接口对上层服务提供媒体文件复用和解复用的驱动能力,详见format目录下的[readme](format/README_zh.md)文档。
20-   input:Input HDI接口定义及其实现,对上层输入系统服务提供操作input设备的驱动能力,包括input设备管理、业务流控制、数据上报等,详见input目录下的[readme](input/README_zh.md)文档。
21-   sensor:Sensor HDI接口定义与实现,接口主要包括所有Sensor信息查询、Sensor启停、Sensor订阅/去订阅、Sensor参数配置等稳定的接口,简化服务开发,详见sensor目录下的[readme](sensor/README_zh.md)文档。
22-   wlan:WLAN HDI接口定义与实现,包括创建和销毁HAL层和WLAN驱动的通道、获取本设备支持的WLAN特性等,详见wlan目录下的[readme](wlan/README_zh.md)文档。
23-   usb:USB DDK接口定义与实现,负责提供USB Host侧和USB Device侧的设备管理、配置、数据读写等接口,详见usb目录下的[readme](usb/README_zh.md)文档。
24-   camera:Camera HDI接口定义及其实现,对上层Camera Service提供HDI的具体实现,对下管理Camera各个硬件设备等,详见camera目录下的[readme](camera/README_zh.md)文档。
25-   ril:Ril HDI接口定义及其实现,提供通话、SIM卡、短彩信、搜网、蜂窝数据相关的业务处理能力等,详见ril目录下的[readme](ril/README_zh.md)文档。
26
27## 相关仓<a name="section1371113476307"></a>
28
29[驱动子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E9%A9%B1%E5%8A%A8%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
30
31[drivers\_framework](https://gitee.com/openharmony/drivers_framework/blob/master/README_zh.md)
32
33[drivers\_adapter](https://gitee.com/openharmony/drivers_adapter/blob/master/README_zh.md)
34
35[drivers\_adapter\_khdf\_linux](https://gitee.com/openharmony/drivers_adapter_khdf_linux/blob/master/README_zh.md)
36
37[drivers\_peripheral](https://gitee.com/openharmony/drivers_peripheral)
38
39
40
41