This module describes all MCL General API's.
Functions | |
retval_t | mac_init (void) |
Initializes the MAC sublayer. More... | |
uint32_t | mac_ready_to_sleep (void) |
Checks if the mac stack is ready to sleep. More... | |
bool | mac_task (void) |
Runs the MAC scheduler. More... | |
retval_t mac_init | ( | void | ) |
Initializes the MAC sublayer.
References broadcast_q, port_config::direction, FAILURE, indirect_data_q, mac_sleep_trans(), mac_soft_reset(), MAC_SUCCESS, mac_timers_init(), nhle_mac_q, pal_calibrate_rc_osc(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), qmm_queue_init(), stb_init(), tal_init(), and tal_mac_q.
Referenced by wpan_init().
uint32_t mac_ready_to_sleep | ( | void | ) |
Checks if the mac stack is ready to sleep.
Checks if the mac stack is in inactive state for beacon support
or idle in case of no beacon support.
For No beacon support 1 if stack is idle,0 if it is busy
References if(), MAC_ASSOCIATED, mac_busy, MAC_COORDINATOR, MAC_GUARD_TIME_US, MAC_INACTIVE, mac_nhle_q, MAC_PAN_COORD_STARTED, mac_state, mac_superframe_state, MEGA_RF, READY_TO_SLEEP, queue_tag::size, sw_timer_get_residual_time(), T_Beacon_Preparation, T_Beacon_Tracking_Period, tal_incoming_frame_queue, tal_trx_status, timer_trigger, TRX_OFF, and TRX_SLEEP.
bool mac_task | ( | void | ) |
Runs the MAC scheduler.
This function runs the MAC scheduler.
MLME and MCPS queues are removed alternately, starting with MLME queue.
References dispatch_event(), mac_busy, qmm_queue_remove(), and queue_tag::size.
Referenced by wpan_task().