Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
akkoyun committed Jul 28, 2022
1 parent a75b859 commit f417a05
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@ This is a helper library to abstract away I2C transactions and registers.

```C++
// Declare Object
I2C_Functions HDC2010(0x40, true, 3);
I2C_Functions HDC2010(0x40, true, 3); // Connect 0x40 adres with I2C mux channel 3

// Write Register
HDC2010.Write_Register(0x10, 0x22, true); // Write 0x22 data to 0x10 register

// Read Register
uint8_t Result = HDC2010.Read_Register(0x01); // Read register 0x01
```
Library includes some helper I2C functions and a generic I2C multiplexer function.
* Read_Register
* Write_Register
* Read_Multiple_Register
* Read_Multiple_Register_u16
* Write_Multiple_Register
* Write_Command
* Write_Multiple_Command
* Set_Register_Bit
* Clear_Register_Bit
* Read_Register_Bit
* BCDtoDEC
* DECtoBCD
* Control_Device
* Detect
* Address
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "I2C_Functions",
"version": "1.8.2",
"version": "1.8.3",
"repository": {
"type": "git",
"url": "https://github.com/akkoyun/I2C_Functions.git"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=I2C_Functions
version=1.8.2
version=1.8.3
author=Gunce Akkoyun <akkoyun@me.com>
maintainer=Gunce Akkoyun <akkoyun@me.com>
sentence=This is a helper library to abstract away I2C transactions and registers also this tool scans the master I2C bus and reports connected devices.
Expand Down
3 changes: 1 addition & 2 deletions src/Definition.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// I2C Library Definitions
#define __I2C_Functions_Version__ "01.06.03"
#define __I2C_Functions_Version__ "01.08.03"

// Sensor Address Definitions
#define __I2C_Addr_TCA9548__ (uint8_t)0x70
Expand All @@ -10,7 +10,6 @@
#define __I2C_Addr_BQ24298__ (uint8_t)0x6B
#define __I2C_Addr_SHT21__ (uint8_t)0x40
#define __I2C_Addr_SDP810__ (uint8_t)0x25

#define __I2C_Addr_PCF8574_A__ (uint8_t)0x3F
#define __I2C_Addr_PCF8574_B__ (uint8_t)0x3B
#define __I2C_Addr_PCF8574_C__ (uint8_t)0x39
Expand Down
6 changes: 3 additions & 3 deletions src/I2C_Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

// Include Arduino Library
#ifndef __Arduino__
#include <Arduino.h>
#include <Arduino.h>
#endif

// Include Wire Library
#ifndef __Wire__
#include <Wire.h>
#include <Wire.h>
#endif

// Include Definitions
#ifndef __I2C_Functions_Definitions__
#include "Definition.h"
#include "Definition.h"
#endif

// I2C Control Functions
Expand Down

0 comments on commit f417a05

Please sign in to comment.