From bc798a6338042a9232b89d07323ef4dbf44a31f6 Mon Sep 17 00:00:00 2001 From: eonaholic <1452381148@qq.com> Date: Mon, 4 Dec 2023 20:11:07 +0800 Subject: [PATCH] 12 --- src/kernel/include/los_runstop.h | 2 +- src/kernel/include/los_sem.h | 2 +- src/kernel/include/los_slab.h | 2 +- src/kernel/include/los_spinlock.h | 2 +- src/kernel/include/los_swtmr.h | 2 +- src/kernel/include/los_sys.h | 2 +- src/kernel/include/los_tables.h | 3 ++- src/kernel/include/los_task.h | 2 +- src/kernel/include/los_tick.h | 2 +- src/kernel/include/los_tickless.h | 1 + src/kernel/include/los_toolchain.h | 2 +- src/kernel/include/los_trace.h | 3 ++- src/kernel/include/los_typedef.h | 4 +++- src/kernel/include/virtual_serial.h | 3 ++- 14 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/kernel/include/los_runstop.h b/src/kernel/include/los_runstop.h index eff3636..ed864f7 100644 --- a/src/kernel/include/los_runstop.h +++ b/src/kernel/include/los_runstop.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*该函数定义提供了运行停止功能所需的接口和参数类型,为嵌入式系统中的运行停止操作提供了基本的支持 /** * @defgroup los_runstop Wakeup * @ingroup kernel diff --git a/src/kernel/include/los_sem.h b/src/kernel/include/los_sem.h index d89a281..0dc1842 100644 --- a/src/kernel/include/los_sem.h +++ b/src/kernel/include/los_sem.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*这段代码实现了对信号量操作的基本功能,包括创建、删除、请求和释放信号量,并对可能出现的错误情况进行了定义和说明。*/ /** * @defgroup los_sem Semaphore * @ingroup kernel diff --git a/src/kernel/include/los_slab.h b/src/kernel/include/los_slab.h index a812270..d6ef4e4 100644 --- a/src/kernel/include/los_slab.h +++ b/src/kernel/include/los_slab.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*以上代码是关于内存管理中的slab功能的实现。Slab是一种分配固定大小的内存块的机制,用于提高内存分配和释放的效率。以上代码提供了对slab内存分配器的配置和定义*/ /** * @defgroup los_slab Slab * @ingroup kernel diff --git a/src/kernel/include/los_spinlock.h b/src/kernel/include/los_spinlock.h index fd9a673..7faa3d2 100644 --- a/src/kernel/include/los_spinlock.h +++ b/src/kernel/include/los_spinlock.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *---------------------------------------------------------------------------*/ - +/*以上代码实现了自旋锁的基本操作,并根据多处理器系统和非多处理器系统分别进行了处理*/ /** * @defgroup los_spinlock Spinlock * @ingroup kernel diff --git a/src/kernel/include/los_swtmr.h b/src/kernel/include/los_swtmr.h index a87f3c2..6cadc48 100644 --- a/src/kernel/include/los_swtmr.h +++ b/src/kernel/include/los_swtmr.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*这段代码是关于软件定时器的管理接口,主要包括软件定时器的创建、启动、停止、删除等操作。这段代码提供了一套完整的软件定时器管理接口,方便开发人员在嵌入式系统中实现基于时间的任务调度和处理。*/ /** * @defgroup los_swtmr Software timer * @ingroup kernel diff --git a/src/kernel/include/los_sys.h b/src/kernel/include/los_sys.h index fb15c63..915db8d 100644 --- a/src/kernel/include/los_sys.h +++ b/src/kernel/include/los_sys.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*这个头文件提供了系统时间模块的接口和基本定义,为系统时间的管理提供了必要的支持*/ /** * @defgroup los_sys System time * @ingroup kernel diff --git a/src/kernel/include/los_tables.h b/src/kernel/include/los_tables.h index 78ca151..82779bc 100644 --- a/src/kernel/include/los_tables.h +++ b/src/kernel/include/los_tables.h @@ -25,7 +25,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*以上代码是LiteOS系统中定义表格的头文件,其中定义了一些宏用于在汇编代码中生成指定名称和标签的全局符号,用于在LiteOS系统中实现一些底层硬件操作。 +同时还定义了一些用于存储数据的节(section),以确保在可执行文件中包含该数据。此外,还定义了一些用于设置表的类型或属性的宏。*/ #ifndef _LOS_TABLES_H #define _LOS_TABLES_H diff --git a/src/kernel/include/los_task.h b/src/kernel/include/los_task.h index e148a17..bf0cdaa 100644 --- a/src/kernel/include/los_task.h +++ b/src/kernel/include/los_task.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*该函数定义了一些任务错误情况以及一些关于任务处理的函数*/ /** * @defgroup los_task Task * @ingroup kernel diff --git a/src/kernel/include/los_tick.h b/src/kernel/include/los_tick.h index fed2f10..73aef50 100644 --- a/src/kernel/include/los_tick.h +++ b/src/kernel/include/los_tick.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*这些代码主要用于系统计时、延时和低功耗唤醒功能,提供了丰富的 Tick 相关操作接口和功能*/ /** * @defgroup los_tick Tick * @ingroup kernel diff --git a/src/kernel/include/los_tickless.h b/src/kernel/include/los_tickless.h index e50ef5b..10c6dc7 100644 --- a/src/kernel/include/los_tickless.h +++ b/src/kernel/include/los_tickless.h @@ -26,6 +26,7 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ +/*这些代码主要用于开启和关闭 Tickless 模式,提供了 Tickless 相关操作接口和功能。*/ /** * @defgroup los_tickless Tickless * @ingroup kernel diff --git a/src/kernel/include/los_toolchain.h b/src/kernel/include/los_toolchain.h index c0efeaa..c46f60e 100644 --- a/src/kernel/include/los_toolchain.h +++ b/src/kernel/include/los_toolchain.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*这段代码提供了一些通用的宏和函数,可以帮助开发者在不同的编译环境下编写跨平台的代码,并提供了一些位操作的便利功能。*/ /** * @defgroup los_toolchain * @ingroup kernel diff --git a/src/kernel/include/los_trace.h b/src/kernel/include/los_trace.h index f3eed5f..713a86b 100644 --- a/src/kernel/include/los_trace.h +++ b/src/kernel/include/los_trace.h @@ -25,7 +25,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*这段代码是关于 Huawei LiteOS 操作系统中的跟踪(Trace)功能的实现,包括了跟踪数据结构、跟踪事件类型、初始化、启动、停止、事件掩码 +设置以及导出等一系列相关操作。此外,还定义了一些宏,用于用户自定义的跟踪代码存根,以简单地追踪事件。*/ /** * @defgroup los_trace Trace * @ingroup kernel diff --git a/src/kernel/include/los_typedef.h b/src/kernel/include/los_typedef.h index 10b721b..98d5ce6 100644 --- a/src/kernel/include/los_typedef.h +++ b/src/kernel/include/los_typedef.h @@ -25,7 +25,9 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*以上代码是一个类型定义的头文件,用于定义各种数据类型。其中包括基本的整数类型(如UINT8、INT16)、浮点类型(如FLOAT、DOUBLE)、字符类型(CHAR)等。 +此外还定义了一些常用的宏和常量,如NULL、TRUE、FALSE、LOS_OK等。代码中还包含了一些编译器相关的宏定义和属性设置,用于控制变量对齐方式、变量和函数的节 +分配等。该头文件适用于嵌入式系统开发,可以提高代码的可读性和可移植性。*/ /** * @defgroup los_typedef Type define * @ingroup kernel diff --git a/src/kernel/include/virtual_serial.h b/src/kernel/include/virtual_serial.h index d140b54..68d31ef 100644 --- a/src/kernel/include/virtual_serial.h +++ b/src/kernel/include/virtual_serial.h @@ -25,7 +25,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------------- */ - +/*代码是一个虚拟串口头文件,用于定义虚拟串口的初始化、反初始化和获取串口类型等函数。在这个头文件中,还定义了一个名为LOS_VIRSERIAL_CB的结构体, +用于表示虚拟串口的控制、配置或状态管理。此外,代码中还包含了一些条件编译的指令,用于根据配置情况包含相应的头文件或功能实现*/ #ifndef _VIRTUAL_SERIAL_H #define _VIRTUAL_SERIAL_H