sys/include/net/gnrc/gomach.h: fix cpp preprocessorErrorDirective
Preprocesor fails to evaluate the if condicion on L91-92 because RTT_FREQUENCY is not defined, and therefore a division by 0 occurs. TO avoid this replicate the RTT_FREQUENCY undefined warning.
This commit is contained in:
parent
d2e90b2370
commit
fe180daa3b
@ -85,6 +85,9 @@ extern "C" {
|
||||
#define GNRC_GOMACH_SUPERFRAME_DURATION_US (300LU * US_PER_MS)
|
||||
#endif
|
||||
|
||||
#ifndef RTT_FREQUENCY
|
||||
#error "RTT_FREQUENCY undefined."
|
||||
#else
|
||||
#if ((GNRC_GOMACH_SUPERFRAME_DURATION_US < ((1000LU *US_PER_MS) / RTT_FREQUENCY)) || \
|
||||
(GNRC_GOMACH_SUPERFRAME_DURATION_US < (10 *GNRC_GOMACH_CP_DURATION_US)))
|
||||
#undef GNRC_GOMACH_SUPERFRAME_DURATION_US
|
||||
@ -94,6 +97,7 @@ extern "C" {
|
||||
#define GNRC_GOMACH_SUPERFRAME_DURATION_US (10 * GNRC_GOMACH_CP_DURATION_US)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief The maximum duration of the random period at the end of GoMacH's
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user