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 aaf64ec
Show file tree
Hide file tree
Showing 2 changed files with 181 additions and 284 deletions.
3 changes: 2 additions & 1 deletion cpu/stm32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,12 @@ 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 aaf64ec

Please sign in to comment.