summaryrefslogtreecommitdiff
path: root/cesar/cp/beacon/src/beacon.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp/beacon/src/beacon.c')
-rw-r--r--cesar/cp/beacon/src/beacon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cesar/cp/beacon/src/beacon.c b/cesar/cp/beacon/src/beacon.c
index 1ecf0b015d..7b3ea86054 100644
--- a/cesar/cp/beacon/src/beacon.c
+++ b/cesar/cp/beacon/src/beacon.c
@@ -32,6 +32,7 @@
#include "hal/gpio/gpio.h"
#include "bsu/beacon/beacon.h"
#include "bsu/bsu.h"
+#include "mac/ca/ca.h"
/* Private headers. */
#include "cp/beacon/inc/beacon.h"
#include "cp/inc/context.h"
@@ -43,6 +44,16 @@
#define CP_BEACON_SPOC_UPDATE_INTERVAL_DEFAULT_MS \
CONFIG_BEACON_SPOC_UPDATE_INTERVAL_DEFAULT_MS
+/* In CSMA_ONLY mode, the beacon periods are always "merged", so this margin
+ * value is always applied and have for consequence to send the central beacon
+ * after this CA_ACCESS_MERGE_MARGIN_TCK.
+ * Knowing this, when the plug acts as a STA, it should program the timer
+ * after this delay plus the necessary time to receive and process the central
+ * beacon. This warning verifies those two values are compatible. */
+#if (CA_ACCESS_MERGE_MARGIN_TCK >= CP_TIMER_OFFSET_STA)
+# warning "CP_TIMER_OFFSET_STA too small"
+#endif
+
/** Timer expires.
* \param ctx the CP context.
*/