diff --git a/display/interfaces/include/display_gralloc.h b/display/interfaces/include/display_gralloc.h index 5e23feaa743b6dd6667776a56359e1e4bd2e5dd4..44617418b439b17e2fe6b75f118a108a88ae814b 100644 --- a/display/interfaces/include/display_gralloc.h +++ b/display/interfaces/include/display_gralloc.h @@ -50,9 +50,9 @@ typedef struct { /** * @brief Allocates memory based on the parameters passed by the GUI. * - * The allocated memory can be classified into shared memory, memory with cache, and memory without cache. + * @param info Indicates the pointer to the description info of the memory to allocate. * - * @param buffer Indicates the pointer to the buffer of the memory to allocate. + * @param handle Indicates the double pointer to the buffer of the memory to allocate. * * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} * otherwise. @@ -64,7 +64,7 @@ typedef struct { /** * @brief Releases memory. * - * @param buffer Indicates the pointer to the buffer of the memory to release. + * @param handle Indicates the pointer to the buffer of the memory to release. * * @since 1.0 * @version 1.0 @@ -74,7 +74,7 @@ typedef struct { /** * @brief Maps memory to memory without cache in the process's address space. * - * @param buffer Indicates the pointer to the buffer of the memory to map. + * @param handle Indicates the pointer to the buffer of the memory to map. * * @return Returns the pointer to a valid address if the operation is successful; returns NULL otherwise. * @since 1.0 @@ -85,18 +85,18 @@ typedef struct { /** * @brief Maps memory to memory with cache in the process's address space. * - * @param buffer Indicates the pointer to the buffer of the memory to map. + * @param handle Indicates the pointer to the buffer of the memory to map. * * @return Returns the pointer to a valid address if the operation is successful; returns NULL otherwise. * @since 1.0 * @version 1.0 */ - void *(*MmapCache)(GrallocBuffer *buffer); + void *(*MmapCache)(BufferHandle *handle); /** * @brief Unmaps memory, that is, removes any mappings in the process's address space. * - * @param buffer Indicates the pointer to the buffer of the memory to unmap. + * @param handle Indicates the pointer to the buffer of the memory to unmap. * * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} * otherwise. @@ -108,7 +108,7 @@ typedef struct { /** * @brief Flushes data from the cache to memory and invalidates the data in the cache. * - * @param buffer Indicates the pointer to the buffer of the cache to flush. + * @param handle Indicates the pointer to the buffer of the cache to flush. * * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} * otherwise. @@ -120,19 +120,19 @@ typedef struct { /** * @brief Flushes data from the cache mapped via {@link Mmap} to memory and invalidates the data in the cache. * - * @param buffer Indicates the pointer to the buffer of the cache to flush. + * @param handle Indicates the pointer to the buffer of the cache to flush. * * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} * otherwise. * @since 1.0 * @version 1.0 */ - int32_t (*FlushMCache)(BufferHandle *buffer); + int32_t (*FlushMCache)(BufferHandle *handle); /** * @brief Invalidate the Cache, it will update the cache from memory. * - * @param buffer Indicates the pointer to the buffer of the cache which will been invalidated + * @param handle Indicates the pointer to the buffer of the cache which will been invalidated * * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} * otherwise. diff --git a/wlan/README.md b/wlan/README.md index 8d630195911d4779882b92d54f1c2324ab9b5c0b..ee166779c8c54d44ce84b2f01faa693fe0f921c5 100644 --- a/wlan/README.md +++ b/wlan/README.md @@ -14,7 +14,7 @@ This repository defines and implements the WLAN-related Hardware Driver Interfac 2. Obtaining the WLAN features supported by the device 3. Creating a WLAN feature instance -**Figure 1** WLAN driver module architecture +**Figure 1** WLAN driver module architecture  ## Directory Structure @@ -35,7 +35,7 @@ The directory structure of the WLAN repository is as follows: ## Available APIs -The WLAN HAL module provides APIs for the Wi-Fi service, such as creating and destroying an **IWiFi** object and setting the MAC address. +The WLAN HAL module provides APIs for the Wi-Fi service, such as creating and destroying an **IWiFi** object and setting the MAC address. The following table lists the APIs. **Table 1** APIs provided by the WLAN HAL module @@ -48,7 +48,7 @@ The WLAN HAL module provides APIs for the Wi-Fi service, such as creating and de -
int32_t (*CallbackFunc)(int32_t event, struct HdfSBuf *reqData);
+Creates a channel between the HAL and the driver and obtains the NIC supported by the driver.
int32_t (*getSupportFeature)(uint8_t *supType, uint32_t size);
+Obtains the WLAN features available for the device no matter whether it works as an AP, STA, or P2P server/client.
+Obtains the WLAN features available for the device that plays different roles simultaneously (any combination of AP, STA, and P2P server/client).
+int32_t (*createFeature)(int32_t type, struct IWiFiBaseFeature **ifeature);
+int32_t (*getFeatureByIfName)(const char *ifName, struct IWiFiBaseFeature **ifeature);
+Obtains an IWiFiBaseFeature object based on a specified network interface name.
+Registers a callback to listen for IWiFi asynchronous events.
+int32_t (*destroyFeature)(struct IWiFiBaseFeature *ifeature);
+int32_t (*getAsscociatedStas)(const struct IWiFiAp *apFeature, struct StaInfo *staInfo, uint32_t count, uint32_t *num);
+Obtains information (MAC addresses only in the current version) about all the connected STAs.
+int32_t (*setCountryCode)(const struct IWiFiAp *apFeature, const char *code, uint32_t len);
Initializes a specified AP feature. This function is called during the AP feature creation.
+int32_t (*setScanningMacAddres)(const struct IWiFiSta *staFeature, unsigned char *scanMac, uint8_t len);
+Initializes a specified STA feature. This function is called during the STA feature creation.
+const char *(*getNetworkIfaceName)(const struct IWiFiBaseFeature *baseFeature);
+int32_t (*setMacAddress)(const struct IWiFiBaseFeature *, unsigned char *, uint8_t);
@@ -88,11 +167,31 @@ The WLAN HAL module provides APIs for the Wi-Fi service, such as creating and deint32_t (*setTxPower)(const struct IWiFiBaseFeature *, int32_t);
+int32_t (*getValidFreqsWithBand)(const struct IWiFiBaseFeature *baseFeature, int32_t band, int32_t *freqs, uint32_t count, uint32_t *num);
+Obtains the frequencies supported by the 2.4 GHz or 5 GHz band.
+int32_t (*setTxPower)(const struct IWiFiBaseFeature *, int32_t);
int32_t (*getChipId)(const struct IWiFiBaseFeature *baseFeature, uint8_t *chipId);
+int32_t (*getIfNamesByChipId)(const uint8_t chipId, char **ifNames, uint32_t *num);
+Obtains names of all the NICs of the current chip based on the chip ID.
+Initializes a specified base feature. This function is called during the base feature creation.
+