From: rasky Date: Wed, 29 Sep 2010 12:32:42 +0000 (+0000) Subject: SEC: added cpu_relax() in busy-wait loop. X-Git-Tag: 2.6.0~60 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=22230e50a688ac1cdd3145399cb5def52879d0a1;p=bertos.git SEC: added cpu_relax() in busy-wait loop. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4341 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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); }