Skip to content

Commit 708cab6

Browse files
author
jfpoilpret
committed
Add new async I2C example (callback) to list of examples. Fix missing macro on other MCU
1 parent 9c9357c commit 708cab6

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

cores/fastarduino/boards/leonardo_traits.h

+1
Original file line numberDiff line numberDiff line change
@@ -296,5 +296,6 @@ namespace board_traits
296296
friend void ::TIMER3_CAPT_vect(void);
297297
#define DECL_UDRE_ISR_FRIENDS friend void ::USART1_UDRE_vect(void);
298298
#define DECL_RX_ISR_FRIENDS friend void ::USART1_RX_vect(void);
299+
#define DECL_TWI_FRIENDS friend void ::TWI_vect(void);
299300

300301
#endif /* BOARDS_LEONARDO_TRAITS_HH */

cores/fastarduino/boards/mega_traits.h

+1
Original file line numberDiff line numberDiff line change
@@ -561,5 +561,6 @@ namespace board_traits
561561
friend void ::USART1_RX_vect(void); \
562562
friend void ::USART2_RX_vect(void); \
563563
friend void ::USART3_RX_vect(void);
564+
#define DECL_TWI_FRIENDS friend void ::TWI_vect(void);
564565

565566
#endif /* BOARDS_MEGA_TRAITS_HH */

make/Makefile-Examples.mk

+5-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ EXAMPLES_ARDUINO_UNO= complete/Conway \
5858
misc/UtilsCheck \
5959
pci/PinChangeInterrupt4 \
6060
sonar/Sonar10 sonar/Sonar11 \
61-
i2c/DS1307RTC3 \
61+
i2c/DS1307RTC3 i2c/DS1307RTC4 \
6262
i2c/MultiIO0 i2c/MultiIO3 \
6363
i2c/MultiIO4 i2c/MultiIO5 \
6464
tones/tones0 \
@@ -77,7 +77,7 @@ EXAMPLES_ARDUINO_UNO= complete/Conway \
7777

7878
EXAMPLES_ARDUINO_LEONARDO= complete/Conway \
7979
int/ExternalInterrupt3 \
80-
i2c/DS1307RTC3 \
80+
i2c/DS1307RTC3 i2c/DS1307RTC4 \
8181
analog/AnalogComparator3 \
8282
analog/AnalogComparator5 \
8383
uart/UartApp1
@@ -86,7 +86,7 @@ EXAMPLES_ARDUINO_MEGA= int/ExternalInterrupt3 \
8686
analog/AnalogComparator6 \
8787
pci/PinChangeInterrupt4 \
8888
pci/PinChangeInterrupt5MEGA \
89-
i2c/DS1307RTC3 \
89+
i2c/DS1307RTC3 i2c/DS1307RTC4 \
9090
i2c/MultiIO0 \
9191
uart/UartApp1 \
9292
uart/UartApp5 \
@@ -102,7 +102,7 @@ EXAMPLES_ARDUINO_NANO= int/ExternalInterrupt3 \
102102
analog/AnalogComparator3 \
103103
analog/AnalogComparator5 \
104104
analog/AnalogComparator6 \
105-
i2c/DS1307RTC3 \
105+
i2c/DS1307RTC3 i2c/DS1307RTC4 \
106106
i2c/MultiIO0 i2c/MultiIO3 \
107107
i2c/MultiIO4 i2c/MultiIO5 \
108108
sonar/Sonar10 sonar/Sonar11 \
@@ -123,7 +123,7 @@ EXAMPLES_BREADBOARD_ATMEGA328P= int/ExternalInterrupt3 \
123123
analog/AnalogComparator3 \
124124
analog/AnalogComparator5 \
125125
analog/AnalogComparator6 \
126-
i2c/DS1307RTC3 \
126+
i2c/DS1307RTC3 i2c/DS1307RTC4 \
127127
i2c/MultiIO0 i2c/MultiIO3 \
128128
i2c/MultiIO4 i2c/MultiIO5 \
129129
sonar/Sonar10 sonar/Sonar11 \

make/examples-list.txt

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ AccelGyro2 Display (UATX) continuous measures (gyro, accel) from MPU6050 FIFO (i
6868
DS1307RTC1 Change RTC and display (UATX) date/time (i2c)
6969
DS1307RTC2 Change RTC, display (UATX) date/time, use RAM and clock generation (i2c)
7070
DS1307RTC3 Change RTC and display (UATX) date/time (i2c, asynchronous)
71+
DS1307RTC4 Change RTC and display (UATX) date/time (i2c, asynchronous, with callback)
7172
Magneto1 Display (UATX) measures (compass) from HMC5883L (i2c)
7273
Magneto2 Display (UATX) measures (compass) from HMC5883L (i2c, with DRDY interrupt)
7374
MultiADC00 Check MCP3x0x constexpr (compile only, does nothing)

0 commit comments

Comments
 (0)