Skip to content

Commit dac17ed

Browse files
committed
Add Arduino UNO R4 support
1 parent e89df2c commit dac17ed

7 files changed

Lines changed: 100 additions & 9 deletions

File tree

.project

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,97 @@
55
<projects>
66
</projects>
77
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.make.core.makeBuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
<dictionary>
13+
<key>org.eclipse.cdt.core.errorOutputParser</key>
14+
<value>org.eclipse.cdt.autotools.core.ErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.MakeErrorParser;</value>
15+
</dictionary>
16+
<dictionary>
17+
<key>org.eclipse.cdt.make.core.append_environment</key>
18+
<value>true</value>
19+
</dictionary>
20+
<dictionary>
21+
<key>org.eclipse.cdt.make.core.build.arguments</key>
22+
<value></value>
23+
</dictionary>
24+
<dictionary>
25+
<key>org.eclipse.cdt.make.core.build.command</key>
26+
<value>make</value>
27+
</dictionary>
28+
<dictionary>
29+
<key>org.eclipse.cdt.make.core.build.target.auto</key>
30+
<value>all</value>
31+
</dictionary>
32+
<dictionary>
33+
<key>org.eclipse.cdt.make.core.build.target.clean</key>
34+
<value>clean</value>
35+
</dictionary>
36+
<dictionary>
37+
<key>org.eclipse.cdt.make.core.build.target.inc</key>
38+
<value>all</value>
39+
</dictionary>
40+
<dictionary>
41+
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
42+
<value>false</value>
43+
</dictionary>
44+
<dictionary>
45+
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
46+
<value>true</value>
47+
</dictionary>
48+
<dictionary>
49+
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
50+
<value>true</value>
51+
</dictionary>
52+
<dictionary>
53+
<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
54+
<value>true</value>
55+
</dictionary>
56+
<dictionary>
57+
<key>org.eclipse.cdt.make.core.environment</key>
58+
<value></value>
59+
</dictionary>
60+
<dictionary>
61+
<key>org.eclipse.cdt.make.core.stopOnError</key>
62+
<value>false</value>
63+
</dictionary>
64+
<dictionary>
65+
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
66+
<value>true</value>
67+
</dictionary>
68+
</arguments>
69+
</buildCommand>
70+
<buildCommand>
71+
<name>org.eclipse.cdt.autotools.core.genmakebuilderV2</name>
72+
<arguments>
73+
</arguments>
74+
</buildCommand>
75+
<buildCommand>
76+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
77+
<arguments>
78+
</arguments>
79+
</buildCommand>
80+
<buildCommand>
81+
<name>io.sloeber.core.inoToCpp</name>
82+
<arguments>
83+
</arguments>
84+
</buildCommand>
85+
<buildCommand>
86+
<name>org.eclipse.cdt.codan.core.codanBuilder</name>
87+
<arguments>
88+
</arguments>
89+
</buildCommand>
890
</buildSpec>
991
<natures>
92+
<nature>io.sloeber.arduinonature</nature>
93+
<nature>org.eclipse.cdt.core.cnature</nature>
94+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
95+
<nature>org.eclipse.cdt.core.ccnature</nature>
96+
<nature>org.eclipse.cdt.autotools.core.autotoolsNatureV2</nature>
97+
<nature>org.eclipse.cdt.make.core.makeNature</nature>
98+
<nature>org.eclipse.cdt.codan.core.codanNature</nature>
99+
<nature>org.eclipse.cdt.make.core.cfgSupportNature</nature>
10100
</natures>
11101
</projectDescription>

PCF8574.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ PCF8574::PCF8574(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 @@ PCF8574::PCF8574(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
@@ -186,7 +186,7 @@ PCF8574::PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunctio
186186
*/
187187
bool PCF8574::begin(){
188188
this->transmissionStatus = 4;
189-
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO)
189+
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
190190
DEBUG_PRINT(F("begin(sda, scl) -> "));DEBUG_PRINT(_sda);DEBUG_PRINT(F(" "));DEBUG_PRINTLN(_scl);
191191
// _wire->begin(_sda, _scl);
192192
#ifdef ARDUINO_ARCH_STM32

PCF8574.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* PCF8574 GPIO Port Expand
33
*
44
* AUTHOR: Renzo Mischianti
5-
* VERSION: 2.3.5
5+
* VERSION: 2.3.6
66
*
77
* https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
88
*
@@ -109,12 +109,12 @@ class PCF8574 {
109109
PCF8574(uint8_t address);
110110
PCF8574(uint8_t address, uint8_t interruptPin, void (*interruptFunction)() );
111111

112-
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO)
112+
#if !defined(__AVR) && !defined(ARDUINO_ARCH_SAMD) && !defined(TEENSYDUINO) && !defined(ARDUINO_ARCH_RENESAS)
113113
PCF8574(uint8_t address, int sda, int scl);
114114
PCF8574(uint8_t address, int sda, int scl, uint8_t interruptPin, void (*interruptFunction)());
115115
#endif
116116

117-
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32)
117+
#if defined(ESP32) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS)
118118
///// changes for second i2c bus
119119
PCF8574(TwoWire *pWire, uint8_t address);
120120
PCF8574(TwoWire *pWire, uint8_t address, uint8_t interruptPin, void (*interruptFunction)() );

PCF8574_library.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* PCF8574 GPIO Port Expand
33
*
44
* AUTHOR: Renzo Mischianti
5-
* VERSION: 2.3.5
5+
* VERSION: 2.3.6
66
*
77
* https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
88
*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#### If you need more pins [here](https://www.mischianti.org/2019/07/22/pcf8575-i2c-16-bit-digital-i-o-expander/) you can find the pcf8575 16bit version of the IC.
1919

2020
## Changelog
21+
- 10/07/2023: v2.3.6 Support for Arduino UNO R4
2122
- 08/02/2023: v2.3.5 Fix STM32 support and add support for Raspberry Pi Pico and other rp2040 boards
2223
- 10/08/2022: v2.3.4 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/).
2324
- 28/07/2022: v2.3.3 Force SDA SCL to use GPIO numeration (https://www.mischianti.org/forums/topic/cannot-set-sda-clk-on-esp8266/).

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "PCF8574 library",
3-
"version": "2.3.5",
3+
"version": "2.3.6",
44
"keywords": "digital, i2c, encoder, expander, pcf8574, pcf8574a, esp32, esp8266, stm32, SAMD, Arduino, wire, rp2040, Raspberry",
55
"description": "Most starred PCF8574 library. 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/category/my-libraries/pcf8574/",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=PCF8574 library
2-
version=2.3.5
2+
version=2.3.6
33
author=Renzo Mischianti <renzo.mischianti@gmail.com>
44
maintainer=Renzo Mischianti <renzo.mischianti@gmail.com>
55
sentence=Most starred PCF8574 library for Arduino (standard and SAMD), Raspberry Pi Pico and rp2040 boards, ESP8266, smt32 and esp32

0 commit comments

Comments
 (0)