aboutsummaryrefslogtreecommitdiffstats
path: root/src/sensor_lis2dw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensor_lis2dw.c')
-rw-r--r--src/sensor_lis2dw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sensor_lis2dw.c b/src/sensor_lis2dw.c
index 8a4a6a66..d4108667 100644
--- a/src/sensor_lis2dw.c
+++ b/src/sensor_lis2dw.c
@@ -6,7 +6,7 @@
// This file may be distributed under the terms of the GNU GPLv3 license.
#include <string.h> // memcpy
-#include "autoconf.h" // CONFIG_HAVE_GPIO_SPI
+#include "autoconf.h" // CONFIG_WANT_SPI
#include "board/gpio.h" // irq_disable
#include "board/irq.h" // irq_disable
#include "board/misc.h" // timer_read_time
@@ -77,7 +77,7 @@ command_config_lis2dw(uint32_t *args)
switch (args[2]) {
case SPI_SERIAL:
- if (CONFIG_HAVE_GPIO_SPI) {
+ if (CONFIG_WANT_SPI) {
ax->spi = spidev_oid_lookup(args[1]);
ax->bus_type = SPI_SERIAL;
break;
@@ -126,7 +126,7 @@ lis2dw_query(struct lis2dw *ax, uint8_t oid)
uint8_t fifo_ovrn = 0;
uint8_t *d = &ax->sb.data[ax->sb.data_count];
- if (CONFIG_HAVE_GPIO_SPI && ax->bus_type == SPI_SERIAL) {
+ if (CONFIG_WANT_SPI && ax->bus_type == SPI_SERIAL) {
uint8_t msg[7] = {0};
uint8_t fifo[2] = {LIS_FIFO_SAMPLES | LIS_AM_READ , 0};
@@ -220,7 +220,7 @@ command_query_lis2dw_status(uint32_t *args)
uint32_t time2 = 0;
uint8_t status = 0;
- if (CONFIG_HAVE_GPIO_SPI && ax->bus_type == SPI_SERIAL) {
+ if (CONFIG_WANT_SPI && ax->bus_type == SPI_SERIAL) {
uint8_t msg[2] = { LIS_FIFO_SAMPLES | LIS_AM_READ, 0x00 };
time1 = timer_read_time();
spidev_transfer(ax->spi, 1, sizeof(msg), msg);