From 4d98f7da65673067c843d4544cdcaf1e50f01853 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Tue, 13 Oct 2026 14:42:00 +0200 Subject: [PATCH] doc: add new HTS221 documentation Signed-off-by: Frederic Pillon --- .../libraries/Hosted-library-documentation.md | 6 ++ docs/libraries/dedicated/HTS221.md | 65 ------------------- docs/libraries/index.md | 3 +- mkdocs.yml | 2 +- 4 files changed, 8 insertions(+), 68 deletions(-) delete mode 100644 docs/libraries/dedicated/HTS221.md diff --git a/docs/libraries/Hosted-library-documentation.md b/docs/libraries/Hosted-library-documentation.md index 9da4e8baea..2101bba4b5 100644 --- a/docs/libraries/Hosted-library-documentation.md +++ b/docs/libraries/Hosted-library-documentation.md @@ -11,3 +11,9 @@ development documentation. - [Latest released API reference](https://stm32duino.github.io/STM32LoRaWAN/) - [Development API reference](https://stm32duino.github.io/STM32LoRaWAN/dev/) - [Source repository](https://github.com/stm32duino/STM32LoRaWAN) + +## HTS221 + +- [Latest released API reference](https://stm32duino.github.io/HTS221/) +- [Development API reference](https://stm32duino.github.io/HTS221/dev/) +- [Source repository](https://github.com/stm32duino/HTS221) diff --git a/docs/libraries/dedicated/HTS221.md b/docs/libraries/dedicated/HTS221.md deleted file mode 100644 index 4dd2b888a9..0000000000 --- a/docs/libraries/dedicated/HTS221.md +++ /dev/null @@ -1,65 +0,0 @@ -# HTS221 - -Arduino library to support the HTS221 capacitive digital sensor for relative humidity and temperature. - -## API - -* **HTS221Sensor(TwoWire\*, uint8_t)**: class constructor -_Params_ pointer to the I2C instance -_Params_ (optional) address of the component's instance - -* **Enable**: enable sensor -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **Disable**: disable sensor -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **ReadID(uint8_t\*)**: read ID address -_Params_ pointer where store the ID of the device -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **Reset**: reboot memory content -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **GetHumidity(float\*)**: read output register and calculate the humidity -_Params_ pointer to data -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **GetTemperature(float\*)**: read output register and calculate the temperature -_Params_ pointer to data -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **GetODR(float\*)**: get the output data rate mode -_Params_ pointer to data -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **SetODR(float\*)**: set the output data rate mode -_Params_ data rate to be set -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **ReadReg(uint8_t, uint8_t\*)**: read data from register -_Params_ register address -_Params_ pointer to register data -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -* **WriteReg(uint8_t, uint8_t)**: write data to register -_Params_ register address -_Params_ register data -_Returns_ HTS221_STATUS_OK in case of success, an error code otherwise - -> [!NOTE] -> This library uses the Wire library presents in the STM32 core by default. - -## Examples - -* DISCO_IOT_DataLogTerminal: reads temperature and humidity values and prints them. - -## Source - -You can find the source files at -https://github.com/stm32duino/HTS221 - -## Documentation - -The HTS221 datasheet is available at -http://www.st.com/content/st_com/en/products/mems-and-sensors/humidity-sensors/hts221.html diff --git a/docs/libraries/index.md b/docs/libraries/index.md index 0a358a9048..91e6e4aac0 100644 --- a/docs/libraries/index.md +++ b/docs/libraries/index.md @@ -57,8 +57,7 @@ Some libraries have been developed to support specific features (hardware or not * [FatFS](https://github.com/stm32duino/FatFs): FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture -* [HTS221](https://github.com/stm32duino/HTS221): to support the HTS221 capacitive digital sensor for relative humidity and temperature. - Dedicated [HTS221](dedicated/HTS221.md) +* [HTS221](https://github.com/stm32duino/HTS221): to support the HTS221 capacitive digital sensor for relative humidity and temperature. See the [hosted API documentation](https://stm32duino.github.io/HTS221/). * [IIS2MDC](https://github.com/stm32duino/IIS2MDC): to support the IIS2MDC high-performance 3-axis magnetometer * [ISM330DLC](https://github.com/stm32duino/ISM330DLC): to support the ISM330DLC 3D accelerometer and 3D gyroscope * [LIS2DW12](https://github.com/stm32duino/LIS2DW12): to support the LIS2DW12 3D accelerometer diff --git a/mkdocs.yml b/mkdocs.yml index 3b17624286..2cbc6a5646 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -26,7 +26,6 @@ nav: - Built-in: - Servo: libraries/built-in/Servo-library.md - Dedicated: - - HTS221: libraries/dedicated/HTS221.md - LPS22HB: libraries/dedicated/LPS22HB.md - LIS3MDL: libraries/dedicated/LIS3MDL.md - LSM6DSL: libraries/dedicated/LSM6DSL.md @@ -41,6 +40,7 @@ nav: - Hosted library documentation: - Library documentation index: libraries/Hosted-library-documentation.md - STM32LoRaWAN: https://stm32duino.github.io/STM32LoRaWAN/ + - HTS221: https://stm32duino.github.io/HTS221/ - Development: - Contributing: development/Contributing.md - Using the Git Repository: development/Using-git-repository.md