X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fsec%2Frandom_lm3s.c;h=b5945f461ea5fa89df8ebb734093068a8538d682;hb=ae3571e0d7273f8642468c6a0958c29c05dc7b2a;hp=0adc96cef7b9ebb1d438ba7e516780a270e449e7;hpb=239b0b70c59b7242e0ff604b7f8b87a37f83de56;p=bertos.git diff --git a/bertos/sec/random_lm3s.c b/bertos/sec/random_lm3s.c index 0adc96ce..b5945f46 100644 --- a/bertos/sec/random_lm3s.c +++ b/bertos/sec/random_lm3s.c @@ -36,6 +36,7 @@ */ #include "random_p.h" +#include #include #include @@ -47,7 +48,8 @@ INLINE uint16_t hw_readRawTemp(void) /* Trig the temperature sampling */ HWREG(ADC0_BASE + ADC_O_PSSI) |= ADC_PSSI_SS3; - while (!(HWREG(ADC0_BASE + ADC_O_SSFSTAT3) & ADC_SSFSTAT3_FULL)); + while (!(HWREG(ADC0_BASE + ADC_O_SSFSTAT3) & ADC_SSFSTAT3_FULL)) + cpu_relax(); return (uint16_t)HWREG(ADC0_BASE + ADC_O_SSFIFO3); }