4.115
Last change
on this file since c918737e was
c918737e,
checked in by Christian Mauderer <Christian.Mauderer@…>, on 10/24/13 at 14:26:59
|
bsp/stm32f4: Add a simple I2C-driver.
|
-
Property mode set to
100644
|
File size:
885 bytes
|
Rev | Line | |
---|
[c918737e] | 1 | /* |
---|
| 2 | * Copyright (c) 2013 Christian Mauderer. All rights reserved. |
---|
| 3 | * |
---|
| 4 | * embedded brains GmbH |
---|
| 5 | * Obere Lagerstr. 30 |
---|
| 6 | * 82178 Puchheim |
---|
| 7 | * Germany |
---|
| 8 | * <rtems@embedded-brains.de> |
---|
| 9 | * |
---|
| 10 | * The license and distribution terms for this file may be |
---|
| 11 | * found in the file LICENSE in this distribution or at |
---|
| 12 | * http://www.rtems.com/license/LICENSE. |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | #include <bspopts.h> |
---|
| 16 | #include <bsp/i2c.h> |
---|
| 17 | #include <bsp/irq.h> |
---|
| 18 | |
---|
| 19 | #ifdef STM32F4_ENABLE_I2C1 |
---|
| 20 | static stm32f4_i2c_bus_entry stm32f4_i2c1_entry = { |
---|
| 21 | .regs = STM32F4_I2C1, |
---|
| 22 | .index = 0, |
---|
| 23 | .vector = STM32F4_IRQ_I2C1_EV, |
---|
| 24 | }; |
---|
| 25 | |
---|
| 26 | stm32f4_i2c_bus_entry *const stm32f4_i2c1 = &stm32f4_i2c1_entry; |
---|
| 27 | #endif |
---|
| 28 | |
---|
| 29 | #ifdef STM32F4_ENABLE_I2C2 |
---|
| 30 | static stm32f4_i2c_bus_entry stm32f4_i2c2_entry = { |
---|
| 31 | .regs = STM32F4_I2C2, |
---|
| 32 | .index = 1, |
---|
| 33 | .vector = STM32F4_IRQ_I2C2_EV, |
---|
| 34 | }; |
---|
| 35 | |
---|
| 36 | stm32f4_i2c_bus_entry *const stm32f4_i2c2 = &stm32f4_i2c2_entry; |
---|
| 37 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.