• Home
Name Date Size #Lines LOC

..--

audio/12-May-2024-75,31860,737

base/12-May-2024-126100

bluetooth/12-May-2024-12,0279,187

camera/12-May-2024-64,76747,298

codec/12-May-2024-12,6879,633

display/12-May-2024-26,90319,576

format/12-May-2024-1,855849

input/12-May-2024-10,8667,701

misc/12-May-2024-4,3572,940

nfc/connected_tag/12-May-2024-777549

power/12-May-2024-723551

powermgr/battery/12-May-2024-4,6323,623

sensor/12-May-2024-4,6353,286

thermal/12-May-2024-2,9012,234

usb/12-May-2024-63,35548,190

wlan/12-May-2024-13,24910,298

.clang-formatD12-May-2024892 2928

.gitignoreD12-May-202418 54

LICENSED12-May-202410.1 KiB177150

OAT.xmlD12-May-20247.9 KiB11159

README.mdD12-May-20243.4 KiB3721

README_zh.mdD12-May-20243 KiB3923

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
24## Repositories Involved<a name="section1371113476307"></a>
25
26[Driver subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/driver-subsystem.md)
27
28[drivers\_framework](https://gitee.com/openharmony/drivers_framework/blob/master/README.md)
29
30[drivers\_adapter](https://gitee.com/openharmony/drivers_adapter/blob/master/README.md)
31
32[drivers\_adapter\_khdf\_linux](https://gitee.com/openharmony/drivers_adapter_khdf_linux/blob/master/README.md)
33
34[drivers\_peripheral](https://gitee.com/openharmony/drivers_peripheral)
35
36
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接口的定义,用于管理声卡驱动的加载和卸载、创建音频播放对象3及录音对象、选择音频场景、设置音频属性及音量、控制音频播放及录音的启停等,详见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## 相关仓<a name="section1371113476307"></a>
26
27[驱动子系统](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)
28
29[drivers\_framework](https://gitee.com/openharmony/drivers_framework/blob/master/README_zh.md)
30
31[drivers\_adapter](https://gitee.com/openharmony/drivers_adapter/blob/master/README_zh.md)
32
33[drivers\_adapter\_khdf\_linux](https://gitee.com/openharmony/drivers_adapter_khdf_linux/blob/master/README_zh.md)
34
35[drivers\_peripheral](https://gitee.com/openharmony/drivers_peripheral)
36
37
38
39