Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

The MAC Core Layer (MCL) abstracts and implements IEEE 802.15.4-2006 compliant behavior for non-beacon enabled and beacon-enabled network support.

Macros

#define MAKE_MAC_BUSY()
 This macro sets the MAC to busy. More...
 
#define MAKE_MAC_NOT_BUSY()
 This macro sets the MAC to not busy. More...
 

Functions

void dispatch_event (uint8_t *event)
 Obtains the message type from the buffer and calls the respective handler. More...
 
void flush_gts_queues (void)
 
void handle_gts_data_req (mcps_data_req_t *data_req, uint8_t *msg)
 
void handle_gts_data_tx_end (void)
 
void handle_gts_sync_loss (void)
 
void init_gts_queues (void)
 
uint8_t mac_add_gts_info (uint8_t *frame_ptr)
 
void mac_gen_mcps_data_conf (buffer_t *buf_ptr, uint8_t status, uint8_t handle, uint32_t timestamp)
 
void mac_gen_mlme_gts_conf (buffer_t *buf_ptr, uint8_t status, gts_char_t gts_char)
 
void mac_gts_table_update (void)
 
void mac_idle_trans (void)
 Resets the MAC helper variables and transition to idle state. More...
 
void mac_parse_bcn_gts_info (uint8_t gts_count, uint8_t gts_dir, mac_gts_list_t *gts_list_ptr)
 
void mac_process_data_frame (buffer_t *buf_ptr)
 Processes data frames. More...
 
void mac_process_gts_request (buffer_t *gts_req)
 
void mac_process_tal_data_ind (uint8_t *msg)
 Depending on received frame the appropriate function is called. More...
 
void mac_sleep_trans (void)
 Puts the radio to sleep if this is allowed. More...
 
void mac_t_gts_cb (void *callback_parameter)
 
void mac_trx_init_sleep (void)
 MAC function to put the radio to sleep mode. More...
 
void mac_trx_wakeup (void)
 MAC function to wake-up the radio from sleep state. More...
 
void mac_tx_gts_data (queue_t *gts_data)
 
void reset_gts_expiry (mac_pan_gts_mgmt_t *mac_pan_gts_entry)
 
void reset_gts_globals (void)
 
retval_t set_tal_pib_internal (uint8_t attribute, pib_value_t *attribute_value)
 Wakes-up the radio and sets the corresponding TAL PIB attribute. More...
 

#define MAKE_MAC_BUSY ( )
Value:
do { \
mac_busy = true; \
} \
while (0)
bool mac_busy
MAC busy state, indicates whether MAC can process any request from NHLE.
Definition: avr2025_mac/source/mac/src/mac.c:192
while(s->file.len > 0)
Definition: wireless/SmartConnect_6LoWPAN/apps/ip64-webserver/httpd.c:170

This macro sets the MAC to busy.

Referenced by mac_process_tal_tx_status(), mac_tx_gts_data(), mcps_data_request(), and mlme_gts_request().

#define MAKE_MAC_NOT_BUSY ( )
Value:
do { \
mac_busy = false; \
} \
while (0)
bool mac_busy
MAC busy state, indicates whether MAC can process any request from NHLE.
Definition: avr2025_mac/source/mac/src/mac.c:192
while(s->file.len > 0)
Definition: wireless/SmartConnect_6LoWPAN/apps/ip64-webserver/httpd.c:170

This macro sets the MAC to not busy.

Referenced by tal_tx_frame_done_cb().

void dispatch_event ( uint8_t *  event)

Obtains the message type from the buffer and calls the respective handler.

This function decodes all events/messages and calls the appropriate handler.

Parameters
eventPointer to the buffer header whose body part holds the message type and message elemnets

References Assert, CMD_ID_OCTET, event, LAST_MESSAGE, NULL, and PGM_READ_WORD.

Referenced by mac_task(), and wpan_task().

void flush_gts_queues ( void  )

References dev_tx_gts_q, gts_q, and MAX_GTS_ON_PANC.

Referenced by flush_queues().

void init_gts_queues ( void  )
void mac_gen_mcps_data_conf ( buffer_t *  buf_ptr,
uint8_t  status,
uint8_t  handle,
uint32_t  timestamp 
)
void mac_gen_mlme_gts_conf ( buffer_t *  buf_ptr,
uint8_t  status,
gts_char_t  gts_char 
)
void mac_idle_trans ( void  )

Resets the MAC helper variables and transition to idle state.

This function sets the MAC to idle state and resets MAC helper variables

References Assert, mac_sleep_trans(), mac_soft_reset(), MAC_SUCCESS, mac_trx_wakeup(), macPANId, macPANId_def, macShortAddress, macShortAddress_def, and set_tal_pib_internal().

Referenced by mac_process_tal_data_ind(), mac_process_tal_tx_status(), and process_data_ind_not_transient().

void mac_trx_init_sleep ( void  )
void reset_gts_expiry ( mac_pan_gts_mgmt_t mac_pan_gts_entry)
retval_t set_tal_pib_internal ( uint8_t  attribute,
pib_value_t *  attribute_value 
)

Wakes-up the radio and sets the corresponding TAL PIB attribute.

Parameters
attributePIB attribute to be set
attribute_valueAttribute value to be set
Returns
Status of the attempt to set the TAL PIB attribute

References mac_radio_sleep_state, mac_sleep_trans(), mac_trx_wakeup(), RADIO_SLEEPING, status, and tal_pib_set().

Referenced by mac_coord_realignment_command_tx_success(), mac_idle_trans(), mlme_start_request(), and process_data_ind_not_transient().