Skip to content

Commit

Permalink
boards/arduino-nano-33-ble-sense: removed useless condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mewen.berthelot committed May 16, 2024
1 parent 9e96f5d commit b0bb184
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
16 changes: 6 additions & 10 deletions boards/arduino-nano-33-ble-sense/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,20 @@
*/

#include "board.h"

#if defined(MODULE_APDS9960) || defined(MODULE_HTS221) || defined(MODULE_LPS22HB)
#include "periph/gpio.h"
#endif

void board_init(void)
{

/*
* VDD needs to be set in order to have the sensors powered.
* It also seems that if the internal I2C pins are not set as input,
* all the sensors connected will not work.
*/
#if defined(MODULE_APDS9960) || defined(MODULE_HTS221) || defined(MODULE_LPS22HB)
/*
* VDD needs to be set in order to have the sensors powered.
* It also seems that if the internal I2C pins are not set as input,
* all the sensors connected will not work.
*/
gpio_init(VDD, GPIO_OUT);
gpio_set(VDD);

gpio_init(SCL1, GPIO_IN);
gpio_init(SDA1, GPIO_IN);
#endif

}
9 changes: 4 additions & 5 deletions boards/arduino-nano-33-ble-sense/include/periph_conf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2020 Inria
* 2024 Méwen Berthelot
* Copyright (C) 2024 Méwen Berthelot
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
Expand All @@ -24,7 +23,7 @@
#include "cfg_clock_32_1.h"
#include "cfg_rtt_default.h"
#include "cfg_timer_default.h"
#include "board.h"


Check warning on line 27 in boards/arduino-nano-33-ble-sense/include/periph_conf.h

View workflow job for this annotation

GitHub Actions / static-tests

too many consecutive empty lines
#ifdef __cplusplus
extern "C"
Expand Down Expand Up @@ -66,8 +65,8 @@ extern "C"
},
{
.dev = NRF_TWIM1,
.scl = SCL1,
.sda = SDA1,
.scl = GPIO_PIN(0, 15),
.sda = GPIO_PIN(0, 14),
.speed = I2C_SPEED_NORMAL
},
};
Expand Down

0 comments on commit b0bb184

Please sign in to comment.