/**
* Enable entropy gathering
*
+ * @ret rc Return status code
*/
-static void rtc_entropy_enable ( void ) {
+static int rtc_entropy_enable ( void ) {
rtc_hook_isr();
enable_irq ( RTC_IRQ );
rtc_enable_int();
+
+ return 0;
}
/**
int rc;
/* Enable entropy gathering */
- entropy_enable();
+ if ( ( rc = entropy_enable() ) != 0 )
+ return rc;
/* Perform mandatory startup tests, if not yet performed */
for ( ; startup_tested < startup_test_count() ; startup_tested++ ) {
/**
* Enable entropy gathering
*
+ * @ret rc Return status code
*/
-void entropy_enable ( void );
+int entropy_enable ( void );
/**
* Disable entropy gathering
#define ENTROPY_PREFIX_null __null_
#endif
-static inline __always_inline void
+static inline __always_inline int
ENTROPY_INLINE ( null, entropy_enable ) ( void ) {
/* Do nothing */
+ return 0;
}
static inline __always_inline void
for ( i = 0 ; i < ( SAMPLE_COUNT / SAMPLE_BLOCKSIZE ) ; i++ ) {
/* Collect one block of samples */
- entropy_enable();
+ rc = entropy_enable();
+ ok ( rc == 0 );
for ( j = 0 ; j < SAMPLE_BLOCKSIZE ; j++ ) {
rc = get_noise ( &samples[j] );
ok ( rc == 0 );