From e297562641a5c6f62f36593b6edc260e2c1685bd Mon Sep 17 00:00:00 2001 From: arighi Date: Sat, 17 Apr 2010 15:04:16 +0000 Subject: [PATCH] lm3s1968: introduce lm3s_gpioPinRead(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3446 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/gpio_lm3s.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bertos/cpu/cortex-m3/drv/gpio_lm3s.h b/bertos/cpu/cortex-m3/drv/gpio_lm3s.h index 9ff6b56b..d80c033f 100644 --- a/bertos/cpu/cortex-m3/drv/gpio_lm3s.h +++ b/bertos/cpu/cortex-m3/drv/gpio_lm3s.h @@ -82,7 +82,13 @@ enum /* Write a value to the specified pin(s) */ INLINE void lm3s_gpioPinWrite(uint32_t port, uint8_t pins, uint8_t val) { - HWREG(port + (GPIO_O_DATA + (pins << 2))) = val; + HWREG(port + GPIO_O_DATA + (pins << 2)) = val; +} + +/* Read a value from the specified pin(s) */ +INLINE uint32_t lm3s_gpioPinRead(uint32_t port, uint8_t pins) +{ + return HWREG(port + GPIO_O_DATA + (pins << 2)); } int lm3s_gpioPinConfig(uint32_t port, uint8_t pins, -- 2.25.1