From 62286803a69b0a59bf6a4b09b2e4011634228402 Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Sat, 15 Jun 2024 14:45:54 +0300 Subject: [PATCH] Updated some comments --- README.md | 2 -- include/zh_vector.h | 18 ++++++------------ zh_vector.c | 6 ------ 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 4c23252..4e1dbd2 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ 1. Do not enable SPI RAM support unless you are sure that SPI RAM is present in your ESP32 module and it is properly configured via menuconfig. 2. If SPI RAM is present via menuconfig select Component Config -> ESP PSRAM -> Support for external, SPI-connected RAM and select SPI RAM config -> SPI RAM access method -> Make RAM allocatable using heap_caps_malloc(…, MALLOC_CAP_SPIRAM). -## [Function description](http://zh-vector.zh.com.ru) - ## Using In an existing project, run the following command to install the component: diff --git a/include/zh_vector.h b/include/zh_vector.h index c83183a..7c20a70 100644 --- a/include/zh_vector.h +++ b/include/zh_vector.h @@ -1,9 +1,3 @@ -/** - * @file - * Header file for the zh_vector component. - * - */ - #pragma once #include "stdlib.h" @@ -23,12 +17,12 @@ extern "C" */ typedef struct { - void **items; ///< Array of pointers of vector items. @note - uint16_t capacity; ///< Maximum capacity of the vector. @note Used to control the size of allocated memory for array of pointers of vector items. Usually equal to the current number of items in the vector. Automatically changes when items are added or deleted. - uint16_t size; ///< Number of items in the vector. @note Can be read with zh_vector_get_size(). - uint16_t unit; ///< Vector item size. @note Possible values from 1 to 65536. - bool status; ///< Vector initialization status flag. @note Used to prevent execution of vector functions without prior vector initialization. - bool spi_ram; ///< SPI RAM using status flag. @note True - vector will be placed in SPI RAM, false - vector will be placed in RAM. + void **items; // Array of pointers of vector items. + uint16_t capacity; // Maximum capacity of the vector. @note Used to control the size of allocated memory for array of pointers of vector items. Usually equal to the current number of items in the vector. Automatically changes when items are added or deleted. + uint16_t size; // Number of items in the vector. @note Can be read with zh_vector_get_size(). + uint16_t unit; // Vector item size. @note Possible values from 1 to 65536. + bool status; // Vector initialization status flag. @note Used to prevent execution of vector functions without prior vector initialization. + bool spi_ram; // SPI RAM using status flag. @note True - vector will be placed in SPI RAM, false - vector will be placed in RAM. } zh_vector_t; /** diff --git a/zh_vector.c b/zh_vector.c index 8ea7169..9b3ef41 100644 --- a/zh_vector.c +++ b/zh_vector.c @@ -1,9 +1,3 @@ -/** - * @file - * The main code of the zh_vector component. - * - */ - #include "zh_vector.h" static const char *TAG = "zh_vector";