mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/thing52: enable VDD pin for hts221 or lps22hb devices
This commit is contained in:
parent
7b33599179
commit
c5664b77b0
@ -21,8 +21,19 @@
|
||||
#include "cpu.h"
|
||||
#include "board.h"
|
||||
|
||||
#if defined(MODULE_LPS22HB) || defined(MODULE_HTS221)
|
||||
#include "periph/gpio.h"
|
||||
#endif
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
/* LP22HB and HTS221 can only be powered with VREG when VDD_PWR_CTRL_PIN
|
||||
is set. */
|
||||
#if defined(MODULE_LPS22HB) || defined(MODULE_HTS221)
|
||||
gpio_init(VDD_PWR_CTRL_PIN, GPIO_OUT);
|
||||
gpio_set(VDD_PWR_CTRL_PIN);
|
||||
#endif
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
}
|
||||
|
@ -33,6 +33,14 @@ extern "C" {
|
||||
#define BTN0_MODE GPIO_IN_PU
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Power switch pins definitions
|
||||
* @{
|
||||
*/
|
||||
#define SPK_PWR_CTRL_PIN GPIO_PIN(0, 29) /**< Speaker power switch */
|
||||
#define VDD_PWR_CTRL_PIN GPIO_PIN(0, 30) /**< VDD power switch */
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name LIS2DH12 low power accelerometer configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user