0.2.4 I2C_24LC1025

This commit is contained in:
Rob Tillaart 2023-05-11 12:39:35 +02:00
parent 6fa7ee3ac5
commit 45a5c60aa2
5 changed files with 17 additions and 10 deletions

View File

@ -5,13 +5,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.2.4] - 2023-05-11
- redo support for RP2040
- see issue #53 / #55 I2C_EEPROM
## [0.2.3] - 2023-05-02
- improve support for RP2040
- move code from .h to .cpp
- update readme.md
- minor edits
## [0.2.2]
- add changelog.md
- add RP2040 to build-CI

View File

@ -1,7 +1,7 @@
//
// FILE: I2C_24LC1025.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.3
// VERSION: 0.2.4
// PURPOSE: I2C_24LC1025 library for Arduino with EEPROM I2C_24LC1025 et al.
// URL: https://github.com/RobTillaart/I2C_24LC1025
@ -11,7 +11,7 @@
// I2C buffer needs max 2 bytes for EEPROM address
// 1 byte for EEPROM register address is available in transmit buffer
#if defined(ESP32) || defined(ESP8266)
#if defined(ESP32) || defined(ESP8266) || defined(PICO_RP2040)
#define I2C_BUFFERSIZE 128
#else
#define I2C_BUFFERSIZE 30 // AVR, STM
@ -32,6 +32,7 @@ I2C_24LC1025::I2C_24LC1025(uint8_t deviceAddress, TwoWire * wire)
#if defined(ESP8266) || defined(ESP32)
bool I2C_24LC1025::begin(uint8_t sda, uint8_t scl)
{
if ((sda < 255) && (scl < 255))
@ -45,10 +46,9 @@ bool I2C_24LC1025::begin(uint8_t sda, uint8_t scl)
_lastWrite = 0;
return isConnected();
}
#endif
#elif defined(ARDUINO_ARCH_RP2040) && !defined(__MBED__)
#if defined(PICO_RP2040)
bool I2C_24LC1025::begin(uint8_t sda, uint8_t scl)
{
if ((sda < 255) && (scl < 255))
@ -62,6 +62,7 @@ bool I2C_24LC1025::begin(uint8_t sda, uint8_t scl)
}
#endif
bool I2C_24LC1025::begin()
{
_wire->begin();

View File

@ -2,7 +2,7 @@
//
// FILE: I2C_24LC1025.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.3
// VERSION: 0.2.4
// PURPOSE: I2C_24LC1025 library for Arduino with EEPROM 24LC1025 et al.
// URL: https://github.com/RobTillaart/I2C_24LC1025
@ -11,7 +11,7 @@
#include "Wire.h"
#define I2C_24LC1025_VERSION (F("0.2.3"))
#define I2C_24LC1025_VERSION (F("0.2.4"))
#define I2C_DEVICESIZE_24LC1025 131072
@ -31,7 +31,9 @@ public:
I2C_24LC1025(uint8_t deviceAddress, TwoWire *wire = &Wire);
#if defined(ESP8266) || defined(ESP32) || defined(PICO_RP2040)
// MBED test ==> see #55, #53 I2C_EEPROM
#if defined(ESP8266) || defined(ESP32) || (defined(ARDUINO_ARCH_RP2040) && !defined(__MBED__))
bool begin(uint8_t sda, uint8_t scl);
#endif
bool begin();

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/I2C_24LC1025"
},
"version": "0.2.3",
"version": "0.2.4",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=I2C_24LC1025
version=0.2.3
version=0.2.4
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library for 24FC1025 I2C EEPROM