Browse Source

STM32F4: I2C Noise Filter Register

pull/1210/head
Chuck McManis 5 years ago
committed by Karl Palsson
parent
commit
3ee9710f35
  1. 26
      include/libopencm3/stm32/f4/i2c.h

26
include/libopencm3/stm32/f4/i2c.h

@ -31,9 +31,33 @@ LGPL License Terms @ref lgpl_license
#ifndef LIBOPENCM3_I2C_H
#define LIBOPENCM3_I2C_H
#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/i2c_common_v1.h>
/**@{*/
/**
@addtogroup i2c_defines
@{*/
/** FLTR register (I2Cx_FLTR) (noise filter) */
#define I2C_FLTR(i2c_base) MMIO32((i2c_base) + 0x24)
#define I2C1_FLTR I2C_FLTR(I2C1)
#define I2C2_FLTR I2C_FLTR(I2C2)
#define I2C3_FLTR I2C_FLTR(I2C3)
/**
* Bits [3:0] DNF - Digital noise filter
* These bits configure a digital noise filter on SDA and SCL pins.
* Value sets minimum pulse width needed to trigger i2c operations.
* 0 disables, 1 - 15 set minimum width to 'n' * TPCLK1
*/
#define I2C_FLTR_DNF_MASK 0xF
#define I2C_FLTR_DNF_SHIFT 0
/**
* Bit 4 - Analog Noise filter disable
* Turns off the built in analog noise filter.
*/
#define I2C_FLTR_ANOFF (1<<4)
/**@}*/

Loading…
Cancel
Save