px-fwlib
0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers
generated with
Doxygen
1.9.2
px_i2c_cfg_template.h
1
#ifndef __PX_I2C_CFG_H__
2
#define __PX_I2C_CFG_H__
3
/* =============================================================================
4
____ ___ ____ ___ _ _ ___ __ __ ___ __ __ TM
5
| _ \ |_ _| / ___| / _ \ | \ | | / _ \ | \/ | |_ _| \ \/ /
6
| |_) | | | | | | | | | | \| | | | | | | |\/| | | | \ /
7
| __/ | | | |___ | |_| | | |\ | | |_| | | | | | | | / \
8
|_| |___| \____| \___/ |_| \_| \___/ |_| |_| |___| /_/\_\
9
10
Copyright (c) 2018 Pieter Conradie <https://piconomix.com>
11
12
License: MIT
13
https://github.com/piconomix/px-fwlib/blob/master/LICENSE.md
14
15
Title: px_i2c_cfg.h : I2C Peripheral Driver configuration
16
Author(s): Pieter Conradie
17
Creation Date: 2018-03-29
18
19
============================================================================= */
20
21
/**
22
* @addtogroup STM32_I2C
23
*
24
* @{
25
*/
26
27
/* _____STANDARD INCLUDES____________________________________________________ */
28
29
/* _____PROJECT INCLUDES_____________________________________________________ */
30
#include "px_defs.h"
31
#include "px_gpio.h"
32
#include "px_board.h"
33
34
/* _____DEFINITIONS__________________________________________________________ */
35
/// Enable/disable support for I2C1 peripheral
36
#define PX_I2C_CFG_I2C1_EN 1
37
38
/// Enable/disable support for I2C2 peripheral
39
#define PX_I2C_CFG_I2C2_EN 0
40
41
/**
42
* I2C peripheral timing register value
43
* Calculated using STM32CubeMX graphical tool:
44
* - Speed Frequency = 100 kHz
45
* - Rise Time = 100 ns
46
* - Fall Time = 10 ns
47
* - Analog Filter = Enabled
48
*/
49
#define PX_I2C_CFG_TIMINGR 0x20302e37
50
51
/// @}
52
#endif