Skip to content

Commit

Permalink
Added BMI160 SPI support
Browse files Browse the repository at this point in the history
  • Loading branch information
EsbenFR authored and Esben Rasmussen committed Jul 2, 2020
1 parent d014abb commit 66d9bca
Show file tree
Hide file tree
Showing 7 changed files with 351 additions and 58 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ CSRC = $(STARTUPSRC) \
confgenerator.c \
timer.c \
i2c_bb.c \
spi_bb.c \
virtual_motor.c \
shutdown.c \
mempools.c \
Expand Down
10 changes: 10 additions & 0 deletions hwconf/hw_das_rs.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@
#define HW_SPI_PORT_MISO GPIOA
#define HW_SPI_PIN_MISO 6

//BMI160 SPI pins
#define BMI160_SPI_PORT_NSS GPIOC
#define BMI160_SPI_PIN_NSS 9
#define BMI160_SPI_PORT_SCK GPIOC
#define BMI160_SPI_PIN_SCK 10
#define BMI160_SPI_PORT_MOSI GPIOC
#define BMI160_SPI_PIN_MOSI 12
#define BMI160_SPI_PORT_MISO GPIOC
#define BMI160_SPI_PIN_MISO 11

// Measurement macros
#define ADC_V_L1 ADC_Value[ADC_IND_SENS1]
#define ADC_V_L2 ADC_Value[ADC_IND_SENS2]
Expand Down
1 change: 1 addition & 0 deletions imu/bmi160_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <stdbool.h>

#include "i2c_bb.h"
#include "spi_bb.h"
#include "bmi160.h"

typedef struct {
Expand Down
Loading

0 comments on commit 66d9bca

Please sign in to comment.