Update Wire.cpp

I2C doesn't work for any board (except F0 probably):
You cannot check #ifndef I2C1_EV_IRQn, because I2C1_EV_IRQn is enum not #define.

The same for #ifndef I2C2_EV_IRQn.
This commit is contained in:
caniggia1 2017-11-14 20:00:57 +01:00 committed by GitHub
parent b067ee7f5e
commit 47caf6375f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -4,10 +4,8 @@
#include "stm32_gpio_af.h"
#include <Arduino.h>
#ifndef I2C1_EV_IRQn
#if defined(STM32F0)||defined(STM32L0) /*F0/L0*/
#define I2C1_EV_IRQn I2C1_IRQn
#endif
#ifndef I2C2_EV_IRQn
#define I2C2_EV_IRQn I2C1_IRQn
#endif