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
38ee38e7
Unverified
Commit
38ee38e7
authored
7 years ago
by
Sebastian Meiling
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #8169 from beduino-project/boards/bluepill/i2c-rebased
bluepill: add i2c support
parents
73d1cca0
906df604
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/bluepill/Makefile.features
+2
-1
2 additions, 1 deletion
boards/bluepill/Makefile.features
boards/bluepill/include/periph_conf.h
+35
-0
35 additions, 0 deletions
boards/bluepill/include/periph_conf.h
with
37 additions
and
1 deletion
boards/bluepill/Makefile.features
+
2
−
1
View file @
38ee38e7
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED
+=
periph_adc
FEATURES_PROVIDED
+=
periph_gpio
FEATURES_PROVIDED
+=
periph_i2c
FEATURES_PROVIDED
+=
periph_pwm
FEATURES_PROVIDED
+=
periph_spi
FEATURES_PROVIDED
+=
periph_timer
FEATURES_PROVIDED
+=
periph_uart
FEATURES_PROVIDED
+=
periph_adc
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP
=
cortex_m3_2
...
...
This diff is collapsed.
Click to expand it.
boards/bluepill/include/periph_conf.h
+
35
−
0
View file @
38ee38e7
...
...
@@ -152,6 +152,41 @@ static const uart_conf_t uart_config[] = {
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
/** @} */
/**
* @name I2C configuration
* @{
*/
#define I2C_NUMOF (2U)
#define I2C_0_EN 1
#define I2C_1_EN 0
/* Disabled by default since pins collide with USART3. */
#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_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_PIN GPIO_PIN(PORT_B, 6)
#define I2C_0_SDA_PIN GPIO_PIN(PORT_B, 7)
/* I2C 1 device configuration */
#define I2C_1_DEV I2C2
#define I2C_1_CLKEN() (periph_clk_en(APB1, RCC_APB1ENR_I2C2EN))
#define I2C_1_CLKDIS() (periph_clk_dis(APB1, RCC_APB1ENR_I2C2EN))
#define I2C_1_EVT_IRQ I2C2_EV_IRQn
#define I2C_1_EVT_ISR isr_i2c2_ev
#define I2C_1_ERR_IRQ I2C2_ER_IRQn
#define I2C_1_ERR_ISR isr_i2c2_er
/* I2C 1 pin configuration */
#define I2C_1_SCL_PIN GPIO_PIN(PORT_B, 10)
#define I2C_1_SDA_PIN GPIO_PIN(PORT_B, 11)
/** @} */
/**
* @name PWM 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