Skip to content

Commit

Permalink
cpu/stm_common: Refactor and fix implementation for i2c_2
Browse files Browse the repository at this point in the history
Refactors i2c_2 to match the structure of i2c_1 better.
Corrects functionality issues.
Allows the common implementation of read_regs and write_regs.
Documents constraints of hardware.
Matches error messages with API.
  • Loading branch information
MrKevinWeiss committed Dec 14, 2018
1 parent 5c4b398 commit b75c9b1
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 245 deletions.
5 changes: 5 additions & 0 deletions cpu/stm32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ typedef uint32_t gpio_t;
#define PERIPH_I2C_NEED_READ_REG
/** Use write reg function from periph common */
#define PERIPH_I2C_NEED_WRITE_REG
#if defined(CPU_FAM_STM32F1) || defined(CPU_FAM_STM32F2) || \
defined(CPU_FAM_STM32L1) || defined(CPU_FAM_STM32F4)
#define PERIPH_I2C_NEED_READ_REGS
#define PERIPH_I2C_NEED_WRITE_REGS
#endif
/** @} */

/**
Expand Down
Loading

0 comments on commit b75c9b1

Please sign in to comment.