Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
27d2841a
Commit
27d2841a
authored
6 years ago
by
Alexandre Abadie
Committed by
dylad
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
boards/nucleo-f207zg: use new style for i2c config
parent
9166fb27
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
boards/nucleo-f207zg/include/periph_conf.h
+17
-23
17 additions, 23 deletions
boards/nucleo-f207zg/include/periph_conf.h
with
17 additions
and
23 deletions
boards/nucleo-f207zg/include/periph_conf.h
+
17
−
23
View file @
27d2841a
...
...
@@ -232,30 +232,24 @@ static const spi_conf_t spi_config[] = {
* @name I2C configuration
* @{
*/
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (CLOCK_APB1)
static
const
i2c_conf_t
i2c_config
[]
=
{
{
.
dev
=
I2C1
,
.
speed
=
I2C_SPEED_NORMAL
,
.
scl_pin
=
GPIO_PIN
(
PORT_B
,
8
),
.
sda_pin
=
GPIO_PIN
(
PORT_B
,
9
),
.
scl_af
=
GPIO_AF4
,
.
sda_af
=
GPIO_AF4
,
.
bus
=
APB1
,
.
rcc_mask
=
RCC_APB1ENR_I2C1EN
,
.
clk
=
CLOCK_APB1
,
.
irqn
=
I2C1_EV_IRQn
}
};
#define I2C_0_ISR isr_i2c1_ev
/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
#define I2C_0_CLKEN() (periph_clk_en(APB1, RCC_APB1ENR_I2C1EN))
#define I2C_0_CLKDIS() (periph_clk_dis(APB1, RCC_APB1ENR_I2C1EN))
#define I2C_0_EVT_IRQ I2C1_EV_IRQn
#define I2C_0_EVT_ISR isr_i2c1_ev
#define I2C_0_ERR_IRQ I2C1_ER_IRQn
#define I2C_0_ERR_ISR isr_i2c1_er
/* I2C 0 pin configuration */
#define I2C_0_SCL_PORT GPIOB
#define I2C_0_SCL_PIN 8
#define I2C_0_SCL_AF 4
#define I2C_0_SCL_PULLUP 0
#define I2C_0_SCL_CLKEN() (periph_clk_en(AHB1, RCC_AHB1ENR_GPIOBEN))
#define I2C_0_SDA_PORT GPIOB
#define I2C_0_SDA_PIN 9
#define I2C_0_SDA_AF 4
#define I2C_0_SDA_PULLUP 0
#define I2C_0_SDA_CLKEN() (periph_clk_en(AHB1, RCC_AHB1ENR_GPIOBEN))
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment