From: arighi Date: Sat, 17 Apr 2010 15:04:16 +0000 (+0000) Subject: lm3s1968: introduce lm3s_gpioPinRead(). X-Git-Tag: 2.5.0~462 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=e297562641a5c6f62f36593b6edc260e2c1685bd;p=bertos.git lm3s1968: introduce lm3s_gpioPinRead(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3446 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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,