Skip to content

Commit 2b6e98b

Browse files
committed
sn32: i2c: fixup I2C1
1 parent d668d48 commit 2b6e98b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

os/hal/ports/SN32/LLD/SN32F2xx/I2C/hal_i2c_lld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ void i2c_lld_start(I2CDriver *i2cp) {
280280

281281
#if SN32_I2C_USE_I2C1 == TRUE
282282
if (&I2CD1 == i2cp) {
283-
sys1EnableI2C0();
283+
sys1EnableI2C1();
284284
nvicClearPending(SN32_I2C1_GLOBAL_NUMBER);
285285
nvicEnableVector(SN32_I2C1_GLOBAL_NUMBER, SN32_I2C_I2C1_IRQ_PRIORITY);
286286
}

os/hal/ports/SN32/LLD/SN32F2xx/I2C/hal_i2c_lld.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ struct hal_i2c_driver {
228228
extern I2CDriver I2CD0;
229229
#endif
230230

231+
#if (SN32_I2C_USE_I2C1 == TRUE) && !defined(__DOXYGEN__)
232+
extern I2CDriver I2CD1;
233+
#endif
234+
231235
#ifdef __cplusplus
232236
extern "C" {
233237
#endif

0 commit comments

Comments
 (0)