forked from libdriver/at24cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
429 changed files
with
307,763 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## 2.0.0 (2021-02-17) | ||
|
||
## Features | ||
|
||
- format the code | ||
|
||
## 1.0.0 (2020-10-15) | ||
|
||
## Features | ||
|
||
- first upload | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (C) LibDriver 2015-2021 | ||
|
||
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: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
<div align=center> | ||
<img src="/doc/image/logo.png"/> | ||
</div> | ||
|
||
## LibDriver ADS1115 | ||
|
||
[English](/README.md) | [ 简体中文](/README_CN.md) | ||
|
||
### Table of Contents | ||
|
||
- [Description](#Description) | ||
- [Instruction](#Instruction) | ||
- [Install](#Install) | ||
- [Usage](#Usage) | ||
- [example basic](#example-basic) | ||
- [Document](#Document) | ||
- [Contributing](#Contributing) | ||
- [License](#License) | ||
- [Contact Us](#Contact-Us) | ||
|
||
|
||
### Description | ||
|
||
AT24CXX is the EEPROM of IIC bus launched by Microchip. It supports 1.7v-5.5v power supply range, IIC standard mode (100kHz), fast mode (400kHz) and high speed mode (1MHz). | ||
|
||
LibDriver AT24CXX is the full function driver of AT24CXX launched by LibDriver. AT24CXX provides EEPROM write and read functions. | ||
|
||
### Instruction | ||
|
||
/src includes LibDriver AT24CXX source files. | ||
|
||
/interface includes LibDriver AT24CXX IIC platform independent template。 | ||
|
||
/test includes LibDriver AT24CXX driver test code and this code can test the chip necessary function simply。 | ||
|
||
/example includes LibDriver AT24CXX sample code. | ||
|
||
/doc includes LibDriver AT24CXX offline document. | ||
|
||
/datasheet includes AT24CXX datasheet。 | ||
|
||
/project includes the common Linux and MCU development board sample code. All projects use the shell script to debug the driver and the detail instruction can be found in each project's README.md. | ||
|
||
### Install | ||
|
||
Reference /interface IIC platform independent template and finish your platform IIC driver. | ||
|
||
Add /src, /interface and /example to your project. | ||
|
||
### Usage | ||
|
||
#### example basic | ||
|
||
```C | ||
uint8_t res; | ||
uint8_t data; | ||
|
||
res = at24cxx_basic_init(AT24C01, AT24CXX_ADDRESS_A000); | ||
if (res) | ||
{ | ||
return 1; | ||
} | ||
|
||
... | ||
|
||
res = at24cxx_basic_read(0x00, (uint8_t *)&data, 1); | ||
if (res) | ||
{ | ||
at24cxx_basic_deinit(); | ||
|
||
return 1; | ||
} | ||
else | ||
{ | ||
at24cxx_interface_debug_print("at24cxx: 0x%02X.\n", data); | ||
} | ||
|
||
... | ||
|
||
res = at24cxx_basic_write(0x00, (uint8_t *)&data, 1); | ||
if (res) | ||
{ | ||
at24cxx_basic_deinit(); | ||
|
||
return 1; | ||
} | ||
else | ||
{ | ||
at24cxx_interface_debug_print("at24cxx: 0x%02X.\n", data); | ||
} | ||
|
||
... | ||
|
||
at24cxx_basic_deinit(); | ||
|
||
return 0; | ||
``` | ||
|
||
### Document | ||
|
||
Online documents: https://www.libdriver.com/docs/at24cxx/index.html | ||
|
||
Offline documents: /doc/html/index.html | ||
|
||
### Contributing | ||
|
||
Please sent an e-mail to [email protected] | ||
|
||
### License | ||
|
||
Copyright (C) LibDriver 2015-2021 All rights reserved | ||
|
||
|
||
|
||
The MIT License (MIT) | ||
|
||
|
||
|
||
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: | ||
|
||
|
||
|
||
The above copyright notice and this permission notice shall be included in all | ||
|
||
copies or substantial portions of the Software. | ||
|
||
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
|
||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
|
||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
|
||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
|
||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
|
||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
|
||
SOFTWARE. | ||
|
||
### Contact Us | ||
|
||
Please sent an e-mail to [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<div align=center> | ||
<img src="/doc/image/logo.png"/> | ||
</div> | ||
|
||
## LibDriver AT24CXX | ||
|
||
[English](/README.md) | [ 简体中文](/README_CH.md) | ||
|
||
### 目录 | ||
|
||
- [描述](#描述) | ||
- [说明](#说明) | ||
- [安装](#安装) | ||
- [使用](#使用) | ||
- [example basic](#example-basic) | ||
- [文档](#文档) | ||
- [贡献](#贡献) | ||
- [版权](#版权) | ||
- [联系我们](#联系我们) | ||
|
||
### 描述 | ||
|
||
AT24CXX是美国微芯半导体推出的IIC总线的EEPROM。它支持1.7V-5.5V的供电范围、支持IIC标准模式(100KHz)、快速模式(400KHz)和高速模式(1MHz)。 | ||
|
||
LibDriver AT24CXX是LibDriver推出的AT24CXX的全功能驱动,该驱动提供EEPROM写入和读取功能。 | ||
|
||
### 说明 | ||
|
||
/src目录包含了LibDriver AT24CXX的源文件。 | ||
|
||
/interface目录包含了LibDriver AT24CXX与平台无关的IIC总线模板。 | ||
|
||
/test目录包含了LibDriver AT24CXX驱动测试程序,该程序可以简单的测试芯片必要功能。 | ||
|
||
/example目录包含了LibDriver AT24CXX编程范例。 | ||
|
||
/doc目录包含了LibDriver AT24CXX离线文档。 | ||
|
||
/datasheet目录包含了AT24CXX数据手册。 | ||
|
||
/project目录包含了常用Linux与单片机开发板的工程样例。所有工程均采用shell脚本作为调试方法,详细内容可参考每个工程里面的README.md。 | ||
|
||
### 安装 | ||
|
||
参考/interface目录下与平台无关的IIC总线模板,完成指定平台的IIC总线驱动。 | ||
|
||
将/src目录,/interface目录和/example目录加入工程。 | ||
|
||
### 使用 | ||
|
||
#### example basic | ||
|
||
```C | ||
uint8_t res; | ||
uint8_t data; | ||
|
||
res = at24cxx_basic_init(AT24C01, AT24CXX_ADDRESS_A000); | ||
if (res) | ||
{ | ||
return 1; | ||
} | ||
|
||
... | ||
|
||
res = at24cxx_basic_read(0x00, (uint8_t *)&data, 1); | ||
if (res) | ||
{ | ||
at24cxx_basic_deinit(); | ||
|
||
return 1; | ||
} | ||
else | ||
{ | ||
at24cxx_interface_debug_print("at24cxx: 0x%02X.\n", data); | ||
} | ||
|
||
... | ||
|
||
res = at24cxx_basic_write(0x00, (uint8_t *)&data, 1); | ||
if (res) | ||
{ | ||
at24cxx_basic_deinit(); | ||
|
||
return 1; | ||
} | ||
else | ||
{ | ||
at24cxx_interface_debug_print("at24cxx: 0x%02X.\n", data); | ||
} | ||
|
||
... | ||
|
||
at24cxx_basic_deinit(); | ||
|
||
return 0; | ||
``` | ||
|
||
### 文档 | ||
|
||
在线文档: https://www.libdriver.com/docs/at24cxx/index.html | ||
|
||
离线文档: /doc/html/index.html | ||
|
||
### 贡献 | ||
|
||
请联系[email protected] | ||
|
||
### 版权 | ||
|
||
版权(C) LibDriver 2015-2021 版权所有 | ||
|
||
MIT 许可证(MIT) | ||
|
||
特此免费授予任何获得本软件副本和相关文档文件(下称“软件”)的人不受限制地处置该软件的权利,包括不受限制地使用、复制、修改、合并、发布、分发、转授许可和/或出售该软件副本,以及再授权被配发了本软件的人如上的权利,须在下列条件下: | ||
|
||
上述版权声明和本许可声明应包含在该软件的所有副本或实质成分中。 | ||
|
||
本软件是“如此”提供的,没有任何形式的明示或暗示的保证,包括但不限于对适销性、特定用途的适用性和不侵权的保证。在任何情况下,作者或版权持有人都不对任何索赔、损害或其他责任负责,无论这些追责来自合同、侵权或其它行为中,还是产生于、源于或有关于本软件以及本软件的使用或其它处置。 | ||
|
||
### 联系我们 | ||
|
||
请联系[email protected] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.