#include <sys/types.h>
#include <cc/mac.h>
#define BMAC_DEBUG | ( | str, | |||
... | ) | {} |
define this if debug output should be printed
void bmac_cmds_register_cmds | ( | void | ) |
Registers some B-MAC related btnode terminal-commands.
void bmac_disable_timer_interrupt | ( | int | disable_timer | ) |
Enables/disables the deactivation of the timer interrupt while sending.
disable_timer | [in] true (1) to enable or false (0) to disable the deactivation mechanism |
void bmac_enable_led | ( | int | enable_led | ) |
Enables/disables led feedback.
enable_led | [in] true (1) to enable or false (0) to disable led feedback |
void bmac_enable_promiscuous_mode | ( | int | enable_promisuous_mode | ) |
Enable promiscuous mode
enable_promisuous_mode | [in] true (1) to enable or false (0) to receive all packets |
u_char bmac_get_ack | ( | void | ) |
Queries the status pf the automatic acknowledgments of unicast packets.
u_short bmac_get_address | ( | void | ) |
Returns the configured mac address.
u_short bmac_get_mtu | ( | void | ) |
Returns the maximal payload size of a B-MAC packet.
int bmac_init | ( | u_short | address | ) |
Initialises the B-MAC library.
address | [in] mac address of the node |
void bmac_lpl_start | ( | void | ) |
Turns on the low power listening, useful to re-turn on the radio
void bmac_lpl_stop | ( | void | ) |
Turns off the low power listening, useful to turn off the radio
void bmac_receive_interrupt | ( | void | ) |
Unblocks the bmac_receive call.
void bmac_set_ack | ( | u_char | enable_ack | ) |
Enables/disables the automatic acknowledgment of unicast packets.
enable_ack | [in] true (1) to enable or false (0) to disable automatic acknowledgments |
void bmac_set_congestion_backoff | ( | u_char | max_duration | ) |
Sets the maximal duration of the congestion backoff.
max_duration | [in] maximal congestion backoff-time |
void bmac_set_frequency | ( | u_long | newFreqHz | ) |
Set the radio to a specific frequency
new | frequency in hertz |
void bmac_set_initial_backoff | ( | u_char | max_duration | ) |
Sets the maximal duration of the initial backoff.
max_duration | [in] maximal initial backoff-time |
void bmac_set_lpl_interval | ( | u_short | interval | ) |
Sets the duration of a LPL interval. If the interval is set to zero, LPL is disabled and the radio is permanently on.
interval | [in] duration of the interval in ms |
void bmac_use_interrupt_to_send | ( | int | use_irq | ) |
Enables/disables the usage of the SPI interrupt for sending.
use_irq | [in] true (1) to enable the usage of the SPI interrupt or false (0) to use busy-waiting |
MAC-Interface