mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards: add ST L3Gxxxx 3-axis gyro family
This commit is contained in:
parent
1c666c5955
commit
327a4a58b2
@ -28,4 +28,9 @@ config BOARD_STM32F3DISCOVERY
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_LSM303DLHC
|
||||
|
||||
# L3Gxxxx gyro
|
||||
select HAVE_L3GXXXX_SPI
|
||||
select HAVE_I3G4250D
|
||||
select HAVE_L3GD20
|
||||
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
@ -1,4 +1,11 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
USEMODULE += lsm303dlhc
|
||||
USEMODULE += l3gxxxx
|
||||
endif
|
||||
|
||||
ifneq (,$(filter l3gxxxx,$(USEMODULE)))
|
||||
USEMODULE += i3g4250d
|
||||
USEMODULE += l3gd20
|
||||
USEMODULE += l3gxxxx_spi
|
||||
endif
|
||||
|
@ -92,11 +92,12 @@ e-compass.
|
||||
|
||||
An 3-axis gyroscope is soldered on the board.
|
||||
|
||||
| Sensor | L3GD20 |
|
||||
| Sensor | L3GD20/I3G4250D [1] |
|
||||
|:------------- |:--------------------- |
|
||||
| Type | Gyroscope |
|
||||
| Vendor | ST Microelectronics |
|
||||
| Datasheet | [Datasheet](https://www.mouser.de/datasheet/2/389/l3gd20-954745.pdf) |
|
||||
| Datasheet L3GD20 | [Datasheet](https://www.mouser.de/datasheet/2/389/l3gd20-954745.pdf) |
|
||||
| Datasheet I3G4250D | [Datasheet](https://www.st.com/resource/en/datasheet/i3g4250d.pdf) |
|
||||
| Connected to | SPI_0 |
|
||||
| Pin Config: | |
|
||||
| Device | SPI1 |
|
||||
@ -107,6 +108,8 @@ An 3-axis gyroscope is soldered on the board.
|
||||
| INT1 | PE0 (IN) |
|
||||
| INT2/DRDY | PE1 (IN) |
|
||||
|
||||
[1] L3GD20 (up to rev. D01), IG34250D (from rev. E02)
|
||||
The driver detects automatically which sensor variant is on the board.
|
||||
|
||||
## Implementation Status
|
||||
|
||||
@ -123,7 +126,7 @@ An 3-axis gyroscope is soldered on the board.
|
||||
| | Inpute Capture| no | |
|
||||
| Accelerometer | LSM303DLHC | no | planned |
|
||||
| Magnetometer | LSM303DLHC | no | planned |
|
||||
| Gyroscope | L3GD20 | no | planned |
|
||||
| Gyroscope | L3GD20/I3G4250D | yes | |
|
||||
|
||||
|
||||
## Flashing the device
|
||||
|
@ -97,6 +97,16 @@ extern "C" {
|
||||
#define LSM303DLHC_PARAM_MAG_PIN GPIO_PIN(PORT_E, 2)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name L3GD20 (Rev. C01, D01), I3G4250D (Rev. E02)
|
||||
* @{
|
||||
*/
|
||||
#define L3GXXXX_SPI_DEV SPI_DEV(0) /**< SPI bus used for L3Gxxxx */
|
||||
#define L3GXXXX_SPI_CS GPIO_PIN(PORT_E, 3) /**< SPI CS pin used for L3Gxxxx */
|
||||
#define L3GXXXX_INT1_PIN GPIO_PIN(PORT_E, 0) /**< INT1 pin used for L3Gxxxx */
|
||||
#define L3GXXXX_INT2_PIN GPIO_PIN(PORT_E, 1) /**< INT2/DRDY pin used for L3Gxxxx */
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -32,4 +32,9 @@ config BOARD_STM32F429I_DISC1
|
||||
select HAVE_ILI9341
|
||||
select HAVE_STMPE811_I2C
|
||||
|
||||
# L3Gxxxx gyro
|
||||
select HAVE_L3GXXXX_SPI
|
||||
select HAVE_I3G4250D
|
||||
select HAVE_L3GD20
|
||||
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
@ -1,5 +1,6 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
USEMODULE += l3gxxxx
|
||||
endif
|
||||
|
||||
ifneq (,$(filter disp_dev,$(USEMODULE)))
|
||||
@ -9,3 +10,9 @@ endif
|
||||
ifneq (,$(filter touch_dev,$(USEMODULE)))
|
||||
USEMODULE += stmpe811_i2c
|
||||
endif
|
||||
|
||||
ifneq (,$(filter l3gxxxx,$(USEMODULE)))
|
||||
USEMODULE += i3g4250d
|
||||
USEMODULE += l3gd20
|
||||
USEMODULE += l3gxxxx_spi
|
||||
endif
|
||||
|
@ -46,13 +46,23 @@ extern "C" {
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief User button
|
||||
* @name User button
|
||||
* @{
|
||||
*/
|
||||
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
|
||||
#define BTN0_PIN GPIO_PIN(PORT_A, 0) /**< GPIO used for BTN0 */
|
||||
#define BTN0_MODE GPIO_IN
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name L3GD20 (Rev. B01, C01), I3G4250D (Rev. D02, E01)
|
||||
* @{
|
||||
*/
|
||||
#define L3GXXXX_SPI_DEV SPI_DEV(0) /**< SPI bus used for L3Gxxxx */
|
||||
#define L3GXXXX_SPI_CS GPIO_PIN(PORT_C, 1) /**< SPI CS pin used for L3Gxxxx */
|
||||
#define L3GXXXX_INT1_PIN GPIO_PIN(PORT_A, 1) /**< INT1 pin used for L3Gxxxx */
|
||||
#define L3GXXXX_INT2_PIN GPIO_PIN(PORT_A, 2) /**< INT2/DRDY pin used for L3Gxxxx */
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user