1
0
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:
Alexandre Abadie 2019-10-04 16:11:17 +02:00
parent 7b33599179
commit c5664b77b0
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 19 additions and 0 deletions

View File

@ -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();
}

View File

@ -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
* @{