X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Finclude%2Fgpio.h;h=56c554a40da4cf938a63e2e43e74cc56c100ca73;hb=195268cae3bb2f462d82dc0178dbca07f0cff706;hp=1ed816c80ff1b1042ffca952d2f99affd7e91f91;hpb=e72388a0aa23da8bc8e24a0cbe9d523c5a9ce294;p=carl9170fw.git diff --git a/carlfw/include/gpio.h b/carlfw/include/gpio.h index 1ed816c..56c554a 100644 --- a/carlfw/include/gpio.h +++ b/carlfw/include/gpio.h @@ -3,7 +3,7 @@ * * GPIO definitions * - * Copyright 2009, 2010 Christian Lamparter + * Copyright 2009-2011 Christian Lamparter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with this program; If not, see . */ #ifndef __CARL9170FW_GPIO_H @@ -37,6 +36,11 @@ static inline __inline void led_set(const unsigned int ledstate) set(AR9170_GPIO_REG_PORT_DATA, ledstate); } +static inline __inline u16 get_random_u16(void) +{ + return getw(AR9170_RAND_REG_NUM); +} + #ifdef CONFIG_CARL9170FW_GPIO_INTERRUPT void gpio_timer(void);