1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #8543 from OTAkeys/pr/rtt_clean_up

periph_rtt: remove RTT_NUMOF guard and init from periph_common
This commit is contained in:
Vincent Dupont 2018-07-10 15:00:53 +02:00 committed by GitHub
commit 071614bf04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -29,9 +29,6 @@
extern "C" {
#endif
/* guard file in case no RTT device was specified */
#if RTT_NUMOF
#ifndef RTT_FREQUENCY
#warning "RTT_FREQUENCY undefined. Set RTT_FREQUENCY to the number of ticks" \
"per second for the current architecture."
@ -166,8 +163,6 @@ void rtt_poweron(void);
*/
void rtt_poweroff(void);
#endif /* RTT_NUMOF */
#ifdef __cplusplus
}
#endif

View File

@ -26,6 +26,9 @@
#ifdef MODULE_PERIPH_RTC
#include "periph/rtc.h"
#endif
#ifdef MODULE_PERIPH_RTT
#include "periph/rtt.h"
#endif
#ifdef MODULE_PERIPH_HWRNG
#include "periph/hwrng.h"
#endif
@ -44,6 +47,11 @@ void periph_init(void)
rtc_init();
#endif
/* Initialize RTT */
#ifdef MODULE_PERIPH_RTT
rtt_init();
#endif
#ifdef MODULE_PERIPH_HWRNG
hwrng_init();
#endif