From 80e448083ef783e1e63a35eb74b55127d994149b Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 26 Jun 2018 21:16:23 +0200 Subject: [PATCH] cpu/msp430fxyz: Fixed input sanitizing in GPIO_PIN --- cpu/msp430fxyz/include/periph_cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/msp430fxyz/include/periph_cpu.h b/cpu/msp430fxyz/include/periph_cpu.h index 36bf7e9e3f..4d4a15b5a2 100644 --- a/cpu/msp430fxyz/include/periph_cpu.h +++ b/cpu/msp430fxyz/include/periph_cpu.h @@ -45,7 +45,7 @@ typedef uint16_t gpio_t; * @brief Mandatory function for defining a GPIO pins * @{ */ -#define GPIO_PIN(x, y) ((gpio_t)(((x & 0xff) << 8) | (1 << (y & 0xff)))) +#define GPIO_PIN(x, y) ((gpio_t)(((x & 0xff) << 8) | (1 << (y & 0x07)))) /** * @brief No support for HW chip select...