Skip to content

Commit

Permalink
feat: change README
Browse files Browse the repository at this point in the history
  • Loading branch information
libdriver committed Dec 12, 2021
1 parent a181ad8 commit b68ebe2
Show file tree
Hide file tree
Showing 91 changed files with 302 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PROJECT_BRIEF = "SGP30 full function drive"
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO =
PROJECT_LOGO = E:/Github/sgp30/doc/image/doxygen.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (C) LibDriver 2015-2021
Copyright (c) 2015 - present LibDriver

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## LibDriver SGP30

[English](/README.md) | [ 简体中文](/README_CN.md)
[English](/README.md) | [ 简体中文](/README_zh-Hans.md) | [繁體中文](/README_zh-Hant.md)

The SGP30 is a digital multi-pixel gas sensor designed for easy integration into air purifier, demand-controlled ventilation, and IoT applications. Sensirion’s CMOSens technology offers a complete sensor system on a single chip featuring a digital I2C interface, a temperature controlled micro hotplate, and two preprocessed indoor air quality signals. As the first metal-oxide gas sensor featuring multiple sensing elements on one chip, the SGP30 provides more detailed information about the air quality.The sensing element features an unmatched robustness against contaminating gases present in real-world applications enabling a unique long-term stability and low drift. The very small 2.45 x 2.45 x 0.9 mm3 DFN package enables applications in limited spaces. Sensirion’s state-of-the-art production process guarantees high reproducibility and reliability. Tape and reel packaging, together with suitability for standard SMD assembly processes make the SGP30 predestined for high-volume applications.

Expand Down Expand Up @@ -184,7 +184,7 @@ Please sent an e-mail to [email protected]
### License
Copyright (C) LibDriver 2015-2021 All rights reserved
Copyright (c) 2015 - present LibDriver All rights reserved
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md → README_zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## LibDriver SGP30

[English](/README.md) | [ 简体中文](/README_CH.md)
[English](/README.md) | [ 简体中文](/README_zh-Hans.md) | [繁體中文](/README_zh-Hant.md)

SGP30是一个数字化多像素气体传感器平台,专为轻松集成到空气净化器、按需新风控制和物联网应用中而设计。SGP30 是一个数字化多像素气体传感器平台,专为轻松集成到空气净化器、按需新风控制和物联网应用中而设计。SGP30 设计用于智能家居、家电和物联网应用,它提供两个经过校准的空气质量信号和湿度补偿功能。Sensirion的CMOSens 技术在单个芯片上提供完整的传感器系统,该系统采用一个数字化 I2C 接口、一个温度控制的微加热器和两个经过预处理的室内空气质量信号。作为首款在单个芯片上采用多个传感元件的金属氧化物气体传感器,SGP30 可提供有关空气质量的更详尽指数。针对现实生活环境中的污染气体,该传感器具有无与伦比的可靠性,可以实现独一无二的长期稳定性和低漂移。 2.45 x 2.45 x 0.9 mm3 DFN 封装支持对空间有要求的应用,Sensirion 的先进生产工艺保证了高度的可再现性和可靠性,胶带和卷轴封装加上标准 SMD 装配工艺使得 SGP30 十分适合大规模生产的应用。

Expand Down Expand Up @@ -184,7 +184,7 @@ return 0;
### 版权
版权(C) LibDriver 2015-2021 版权所有
版权 (c) 2015 - 现在 LibDriver 版权所有
MIT 许可证(MIT)
Expand Down
199 changes: 199 additions & 0 deletions README_zh-Hant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
<div align=center>
<img src="/doc/image/logo.png"/>
</div>

## LibDriver SGP30

[English](/README.md) | [ 简体中文](/README_zh-Hans.md) | [繁體中文](/README_zh-Hant.md)

SGP30是一個數字化多像素氣體傳感器平台,專為輕鬆集成到空氣淨化器、按需新風控制和物聯網應用中而設計。 SGP30 是一個數字化多像素氣體傳感器平台,專為輕鬆集成到空氣淨化器、按需新風控制和物聯網應用中而設計。 SGP30 設計用於智能家居、家電和物聯網應用,它提供兩個經過校準的空氣質量信號和濕度補償功能。 Sensirion的CMOSens 技術在單個芯片上提供完整的傳感器系統,該系統採用一個數字化 I2C 接口、一個溫度控制的微加熱器和兩個經過預處理的室內空氣質量信號。作為首款在單個芯片上採用多個傳感元件的金屬氧化物氣體傳感器,SGP30 可提供有關空氣質量的更詳盡指數。針對現實生活環境中的污染氣體,該傳感器具有無與倫比的可靠性,可以實現獨一無二的長期穩定性和低漂移。 2.45 x 2.45 x 0.9 mm3 DFN 封裝支持對空間有要求的應用,Sensirion 的先進生產工藝保證了高度的可再現性和可靠性,膠帶和捲軸封裝加上標準 SMD 裝配工藝使得 SGP30 十分適合大規模生產的應用。

LibDriver SGP30是LibDriver推出的SGP30的全功能驅動,該驅動提供TVOC、CO2 eq讀取、溫濕度矯正等功能。

### 目錄

- [說明](#說明)
- [安裝](#安裝)
- [使用](#使用)
- [example basic](#example-basic)
- [example advance](#example-advance)
- [文檔](#文檔)
- [貢獻](#貢獻)
- [版權](#版權)
- [聯繫我們](#聯繫我們)

### 說明

/src目錄包含了LibDriver SGP30的源文件。

/interface目錄包含了LibDriver SGP30與平台無關的IIC總線模板。

/test目錄包含了LibDriver SGP30驅動測試程序,該程序可以簡單的測試芯片必要功能。

/example目錄包含了LibDriver SGP30編程範例。

/doc目錄包含了LibDriver SGP30離線文檔。

/datasheet目錄包含了SGP30數據手冊。

/project目錄包含了常用Linux與單片機開發板的工程樣例。所有工程均採用shell腳本作為調試方法,詳細內容可參考每個工程裡面的README.md。

### 安裝

參考/interface目錄下與平台無關的IIC總線模板,完成指定平台的IIC總線驅動。

將/src目錄,/interface目錄和/example目錄加入工程。

### 使用

#### example basic

```C
uint8_t res;
uint8_t i;
uint16_t co2_eq_ppm;
uint16_t tvoc_ppb;

res = sgp30_basic_init();
if (res)
{
return 1;
}

...

for (i = 0; i < 3; i++)
{
sgp30_interface_delay_ms(1000);
res = sgp30_basic_read((uint16_t *)&co2_eq_ppm, (uint16_t *)&tvoc_ppb);
if (res)
{
sgp30_basic_deinit();

return 1;
}
sgp30_interface_debug_print("sgp30: co2 eq is %d ppm.\n", co2_eq_ppm);
sgp30_interface_debug_print("sgp30: tvoc is %d ppb.\n", tvoc_ppb);

...

}

...

sgp30_basic_deinit();

return 0;
```

#### example advance

```C
uint8_t res;
uint8_t i;
uint16_t co2_eq_ppm;
uint16_t tvoc_ppb;
uint16_t id[3];
uint8_t product_type;
uint8_t product_version;

res = sgp30_advance_init();
if (res)
{
return 1;
}

...

res = sgp30_advance_get_serial_id((uint16_t *)id);
if (res)
{
sgp30_advance_deinit();

return 1;
}
sgp30_interface_debug_print("sgp30: serial id 0x%04X 0x%04X 0x%04X.\n", (uint16_t)(id[0]), (uint16_t)(id[1]), (uint16_t)(id[2]))

...

res = sgp30_advance_get_feature((uint8_t *)&product_type, (uint8_t *)&product_version);
if (res)
{
sgp30_advance_deinit();

return 1;
}
sgp30_interface_debug_print("sgp30: product type is 0x%02X.\n", product_type);
sgp30_interface_debug_print("sgp30: product version is 0x%02X.\n", product_version);

...

res = sgp30_advance_set_iaq_baseline(0x01, 0x02);
if (res)
{
sgp30_advance_deinit();

return 1;
}

...

res = sgp30_advance_set_absolute_humidity(25.6, 30.2f);
if (res)
{
sgp30_advance_deinit();

return 1;
}

...

for (i = 0; i < 3; i++)
{
sgp30_interface_delay_ms(1000);
res = sgp30_advance_read((uint16_t *)&co2_eq_ppm, (uint16_t *)&tvoc_ppb);
if (res)
{
sgp30_advance_deinit();

return 1;
}
sgp30_interface_debug_print("sgp30: co2 eq is %d ppm.\n", co2_eq_ppm);
sgp30_interface_debug_print("sgp30: tvoc is %d ppb.\n", tvoc_ppb);

...

}

...

sgp30_advance_deinit();

return 0;
```
### 文檔
在線文檔: https://www.libdriver.com/docs/sgp30/index.html
離線文檔: /doc/html/index.html
### 貢獻
請聯繫[email protected]
### 版權
版權 (c) 2015 - 現在 LibDriver 版權所有
MIT 許可證(MIT)
特此免費授予任何獲得本軟件副本和相關文檔文件(下稱“軟件”)的人不受限制地處置該軟件的權利,包括不受限制地使用、複製、修改、合併、發布、分發、轉授許可和/或出售該軟件副本,以及再授權被配發了本軟件的人如上的權利,須在下列條件下:
上述版權聲明和本許可聲明應包含在該軟件的所有副本或實質成分中。
本軟件是“如此”提供的,沒有任何形式的明示或暗示的保證,包括但不限於對適銷性、特定用途的適用性和不侵權的保證。在任何情況下,作者或版權持有人都不對任何索賠、損害或其他責任負責,無論這些追責來自合同、侵權或其它行為中,還是產生於、源於或有關於本軟件以及本軟件的使用或其它處置。
### 聯繫我們
請聯繫[email protected]
1 change: 1 addition & 0 deletions doc/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/dir_13e138d54eb8818da29c3992edef070a.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/dir_b31d54d5631803016a26f28213a41162.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
1 change: 1 addition & 0 deletions doc/html/dir_e68e8157741866f444e17edd764ebbae.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
Binary file added doc/html/doxygen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion doc/html/driver__sgp30_8c.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down Expand Up @@ -212,7 +213,7 @@
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>driver sgp30 source file </p>
<p>Copyright (C) LibDriver 2015-2021 All rights reserved</p>
<p>Copyright (c) 2015 - present LibDriver All rights reserved</p>
<p>The MIT License (MIT)</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
Expand Down
1 change: 1 addition & 0 deletions doc/html/driver__sgp30_8c_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down
3 changes: 2 additions & 1 deletion doc/html/driver__sgp30_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down Expand Up @@ -206,7 +207,7 @@
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>driver sgp30 header file </p>
<p>Copyright (C) LibDriver 2015-2021 All rights reserved</p>
<p>Copyright (c) 2015 - present LibDriver All rights reserved</p>
<p>The MIT License (MIT)</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
Expand Down
5 changes: 3 additions & 2 deletions doc/html/driver__sgp30_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">LibDriver SGP30
&#160;<span id="projectnumber">2.0.0</span>
Expand Down Expand Up @@ -109,7 +110,7 @@
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="structsgp30__handle__s.html#a406c9433252b7366de417b7a60915c81"> 70</a></span>&#160; void (*<a class="code" href="structsgp30__handle__s.html#a406c9433252b7366de417b7a60915c81">delay_ms</a>)(uint32_t ms); </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structsgp30__handle__s.html#a75f9f50c23e87e9407f9ec4e34bb42f2"> 71</a></span>&#160; uint16_t (*<a class="code" href="structsgp30__handle__s.html#a75f9f50c23e87e9407f9ec4e34bb42f2">debug_print</a>)(<span class="keywordtype">char</span> *fmt, ...); </div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structsgp30__handle__s.html#a19bedf28d2b9748f6a62d9ae93f4e68f"> 72</a></span>&#160; uint8_t <a class="code" href="structsgp30__handle__s.html#a19bedf28d2b9748f6a62d9ae93f4e68f">inited</a>; </div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="group__sgp30__base__driver.html#ga1fd317505ed3dd79a3bb9d4ca0ca3c0e"> 73</a></span>&#160;}<a class="code" href="group__sgp30__base__driver.html#ga1fd317505ed3dd79a3bb9d4ca0ca3c0e">sgp30_handle_t</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="group__sgp30__base__driver.html#ga1fd317505ed3dd79a3bb9d4ca0ca3c0e"> 73</a></span>&#160;} <a class="code" href="group__sgp30__base__driver.html#ga1fd317505ed3dd79a3bb9d4ca0ca3c0e">sgp30_handle_t</a>;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="structsgp30__info__s.html"> 78</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structsgp30__info__s.html">sgp30_info_s</a></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;{</div>
Expand All @@ -122,7 +123,7 @@
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="structsgp30__info__s.html#a8f9dbe66ac0b66ebae0a36fcb4ba368e"> 86</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="structsgp30__info__s.html#a8f9dbe66ac0b66ebae0a36fcb4ba368e">temperature_min</a>; </div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="structsgp30__info__s.html#a3366a5dce9b829e03c3d321c2b4df3f6"> 87</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="structsgp30__info__s.html#a3366a5dce9b829e03c3d321c2b4df3f6">temperature_max</a>; </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structsgp30__info__s.html#a41b0bd442708b70d252c50b92c75265a"> 88</a></span>&#160; uint32_t <a class="code" href="structsgp30__info__s.html#a41b0bd442708b70d252c50b92c75265a">driver_version</a>; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="group__sgp30__base__driver.html#ga49c3af40a7b6b952ab2a4e4c35b8fb7a"> 89</a></span>&#160;}<a class="code" href="group__sgp30__base__driver.html#ga49c3af40a7b6b952ab2a4e4c35b8fb7a">sgp30_info_t</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="group__sgp30__base__driver.html#ga49c3af40a7b6b952ab2a4e4c35b8fb7a"> 89</a></span>&#160;} <a class="code" href="group__sgp30__base__driver.html#ga49c3af40a7b6b952ab2a4e4c35b8fb7a">sgp30_info_t</a>;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="group__sgp30__link__driver.html#ga4a09acee8322263c0121ea14960d853a"> 108</a></span>&#160;<span class="preprocessor">#define DRIVER_SGP30_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; </div>
Expand Down
Loading

0 comments on commit b68ebe2

Please sign in to comment.