Microchip® Advanced Software Framework

mac_beacon.c File Reference

Implements the building of beacon frames and initiates transmission via CSMA-CA after reception of a beacon request frame in a nonbeacon-enabled PAN.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include "return_val.h"
#include "pal.h"
#include "bmm.h"
#include "qmm.h"
#include "tal.h"
#include "ieee_const.h"
#include "mac_msg_const.h"
#include "mac_api.h"
#include "mac_msg_types.h"
#include "mac_data_structures.h"
#include "stack_config.h"
#include "mac_internal.h"
#include "mac.h"
#include "mac_build_config.h"

Macros

#define ADVNC_BCN_PREP_TIME   (50)
 
#define BEACON_MAX_PEND_ADDR_CNT   (7)
 
#define BEACON_PAYLOAD_LEN   (4)
 
#define MAC_MIN_WAKEUP_US   (200)
 

Functions

static uint8_t add_pending_extended_address_cb (void *buf_ptr, void *handle)
 
static uint8_t add_pending_short_address_cb (void *buf_ptr, void *handle)
 
static uint8_t mac_buffer_add_pending (uint8_t *buf_ptr)
 
void mac_build_and_tx_beacon (bool beacon_enabled)
 Builds and transmits the beacon frame. More...
 
void mac_process_beacon_request (buffer_t *msg)
 Processes a beacon request. More...
 
void mac_start_beacon_timer (void)
 Starts the beacon timer. More...
 
static void mac_t_beacon_cb (void *callback_parameter)
 
static void mac_t_prepare_beacon_cb (void *callback_parameter)
 
static void mac_t_superframe_cb (void *callback_parameter)
 
void mac_tx_pending_bc_data (void)
 

Variables

static uint8_t beacon_buffer [LARGE_BUFFER_SIZE]
 
static uint8_t * beacon_ptr
 
static uint8_t pending_address_count
 
static uint8_t vpan_no
 

#define ADVNC_BCN_PREP_TIME   (50)

Referenced by mac_t_beacon_cb().

#define BEACON_MAX_PEND_ADDR_CNT   (7)
#define BEACON_PAYLOAD_LEN   (4)

Referenced by mac_build_and_tx_beacon().

#define MAC_MIN_WAKEUP_US   (200)

static uint8_t add_pending_extended_address_cb ( void *  buf_ptr,
void *  handle 
)
static
static uint8_t add_pending_short_address_cb ( void *  buf_ptr,
void *  handle 
)
static
static void mac_t_prepare_beacon_cb ( void *  callback_parameter)
static
static void mac_t_superframe_cb ( void *  callback_parameter)
static

uint8_t beacon_buffer[LARGE_BUFFER_SIZE]
static
uint8_t pending_address_count
static
uint8_t vpan_no
static

Referenced by mac_build_and_tx_beacon().