X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=carlfw%2Finclude%2Fgpio.h;fp=carlfw%2Finclude%2Fgpio.h;h=56c554a40da4cf938a63e2e43e74cc56c100ca73;hp=a9c0b8805e3e6f9f5575cdc4f258b3f9a0a3c0d0;hb=b16e4b8d1a59abc67e1e7f2f4a5d297fbac6ee73;hpb=028d6ee0b94849385de6d8c5b3117c3c22024df1 diff --git a/carlfw/include/gpio.h b/carlfw/include/gpio.h index a9c0b88..56c554a 100644 --- a/carlfw/include/gpio.h +++ b/carlfw/include/gpio.h @@ -36,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);