Skip to content

Commit

Permalink
cpu/stm_common: Refactor and cleanup i2c_1
Browse files Browse the repository at this point in the history
Refactor to use common read_regs.
Add error reporting and handling for unsupported low level commands.
Document hardware constraints.
  • Loading branch information
MrKevinWeiss committed Dec 20, 2018
1 parent 63e71cb commit f3b2a62
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 285 deletions.
2 changes: 1 addition & 1 deletion cpu/stm32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ typedef uint32_t gpio_t;
#define PERIPH_I2C_NEED_READ_REG
/** Use write reg function from periph common */
#define PERIPH_I2C_NEED_WRITE_REG
#define PERIPH_I2C_NEED_READ_REGS
#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 f3b2a62

Please sign in to comment.