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
2a27cb24
Commit
2a27cb24
authored
7 years ago
by
Alexandre Abadie
Browse files
Options
Downloads
Patches
Plain Diff
boards/nucleo-l073: add configuration for I2C periph
parent
750b98c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
boards/nucleo-l073/Makefile.features
+1
-0
1 addition, 0 deletions
boards/nucleo-l073/Makefile.features
boards/nucleo-l073/include/periph_conf.h
+45
-0
45 additions, 0 deletions
boards/nucleo-l073/include/periph_conf.h
with
46 additions
and
0 deletions
boards/nucleo-l073/Makefile.features
+
1
−
0
View file @
2a27cb24
...
...
@@ -2,6 +2,7 @@
FEATURES_PROVIDED
+=
periph_cpuid
FEATURES_PROVIDED
+=
periph_gpio
FEATURES_PROVIDED
+=
periph_hwrng
FEATURES_PROVIDED
+=
periph_i2c
FEATURES_PROVIDED
+=
periph_pwm
FEATURES_PROVIDED
+=
periph_rtc
FEATURES_PROVIDED
+=
periph_spi
...
...
This diff is collapsed.
Click to expand it.
boards/nucleo-l073/include/periph_conf.h
+
45
−
0
View file @
2a27cb24
...
...
@@ -189,6 +189,51 @@ static const spi_conf_t spi_config[] = {
#define DAC_NUMOF (0)
/** @} */
/**
* @name I2C configuration
* @{
*/
#define I2C_0_EN 1
#define I2C_1_EN 1
#define I2C_NUMOF (I2C_0_EN + I2C_1_EN)
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (CLOCK_APB1)
/* 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_IRQn
#define I2C_0_EVT_ISR isr_i2c1
/* I2C 0 pin configuration */
#define I2C_0_SCL_PORT PORT_B
#define I2C_0_SCL_PIN 8
#define I2C_0_SCL_AF 4
#define I2C_0_SCL_CLKEN() (periph_clk_en(AHB, RCC_IOPENR_GPIOBEN))
#define I2C_0_SDA_PORT PORT_B
#define I2C_0_SDA_PIN 9
#define I2C_0_SDA_AF 4
#define I2C_0_SDA_CLKEN() (periph_clk_en(AHB, RCC_IOPENR_GPIOBEN))
/* I2C 1 device configuration */
#define I2C_1_DEV I2C3
#define I2C_1_CLKEN() (periph_clk_en(APB1, RCC_APB1ENR_I2C3EN))
#define I2C_1_CLKDIS() (periph_clk_dis(APB1, RCC_APB1ENR_I2C3EN))
#define I2C_1_EVT_IRQ I2C3_IRQn
#define I2C_1_EVT_ISR isr_i2c3
/* I2C 1 pin configuration */
#define I2C_1_SCL_PORT PORT_A
#define I2C_1_SCL_PIN 8
#define I2C_1_SCL_AF 3
#define I2C_1_SCL_CLKEN() (periph_clk_en(AHB, RCC_IOPENR_GPIOAEN))
#define I2C_1_SDA_PORT PORT_B
#define I2C_1_SDA_PIN 5
#define I2C_1_SDA_AF 8
#define I2C_1_SDA_CLKEN() (periph_clk_en(AHB, RCC_IOPENR_GPIOBEN))
/** @} */
/** @} */
/**
* @name RTC configuration
* @{
...
...
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