Skip to content

Commit f281abe

Browse files
committed
Add Arduino UNO R4 support
1 parent c782b39 commit f281abe

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

PCF8575.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ PCF8575::PCF8575(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
5353
_usingInterrupt = true;
5454
};
5555

56-
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO)
56+
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
5757
/**
5858
* Constructor
5959
* @param address: i2c address
@@ -90,7 +90,7 @@ PCF8575::PCF8575(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
9090
};
9191
#endif
9292

93-
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32)
93+
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS)
9494
/**
9595
* Constructor
9696
* @param address: i2c address
@@ -158,7 +158,7 @@ PCF8575::PCF8575(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
158158
* wake up i2c controller
159159
*/
160160
void PCF8575::begin(){
161-
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO)
161+
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
162162
DEBUG_PRINT(F("begin(sda, scl) -> "));DEBUG_PRINT(_sda);DEBUG_PRINT(F(" "));DEBUG_PRINTLN(_scl);
163163
// _wire->begin(_sda, _scl);
164164
#ifdef ARDUINO_ARCH_STM32

PCF8575.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ class PCF8575 {
117117
PCF8575(uint8_t address);
118118
PCF8575(uint8_t address, uint8_t interruptPin, void (*interruptFunction)() );
119119

120-
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO)
120+
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
121121
PCF8575(uint8_t address, int sda, int scl);
122122
PCF8575(uint8_t address, int sda, int scl, uint8_t interruptPin, void (*interruptFunction)());
123123
#endif
124124

125-
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32)
125+
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS)
126126
///// changes for second i2c bus
127127
PCF8575(TwoWire *pWire, uint8_t address);
128128
PCF8575(TwoWire *pWire, uint8_t address, uint8_t interruptPin, void (*interruptFunction)() );

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
Library to use i2c analog IC with arduino and esp8266. Can read and write digital value with only 2 wire (perfect for ESP-01).
1717

18+
- 10/07/2023: v1.1.1 Add support for Arduino UNO R4
1819
- 16/02/2023: v1.1.0
1920
- Fix STM32 support and add support for Raspberry Pi Pico and other rp2040 boards
2021
- Add support for custom SERCOM interface of Arduino SAMD devices. Force SDA SCL to use GPIO numeration for STM32 bug (https://www.mischianti.org/forums/topic/compatible-with-stm32duino/).

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "PCF8575 library",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"keywords": "digital, i2c, encoder, expander, pcf8575, pcf8575a, esp32, esp8266, stm32, SAMD, Arduino, wire, Raspberry, rp2040",
55
"description": "PCF8575 library. i2c digital expander for i2c digital expander for Arduino, Raspberry Pi Pico and rp2040 boards, esp32, SMT32 and ESP8266. Can read write digital values with only 2 wire. Very simple to use and encoder support.",
66
"homepage": "https://www.mischianti.org/2019/07/22/pcf8575-i2c-16-bit-digital-i-o-expander/",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=PCF8575 library
2-
version=1.1.0
2+
version=1.1.1
33
author=Renzo Mischianti <[email protected]>
44
maintainer=Renzo Mischianti <[email protected]>
55
sentence=PCF8575, library for Arduino, Raspberry Pi Pico and rp2040 boards, esp32, SMT32 and ESP8266.

0 commit comments

Comments
 (0)