Contiki-NG
|
Files | |
file | antenna-sw.c |
Driver for the RE-Mote RF antenna switch. | |
file | antenna-sw.h |
Header file for the RE-Mote RF antenna switch. | |
Functions | |
void | antenna_sw_config (void) |
Init function for the antenna switch. | |
int | antenna_sw_get (void) |
Function to read the current status of the RF switch. | |
int | antenna_sw_select (uint8_t val) |
Function to select between the 2.4GHz or Sub-1GHz RF interface. | |
Driver for the RE-Mote RF antenna switch, to enable either the internal ceramic antenna or an external one connected to the uFL connector
Driver for the RE-Mote RF switch, to enable either the built-in 2.4GHz RF interface of the CC2538, or the CC1200 Sub-1GHz RF interface, both routed to the RP-SMA connector for an external antenna. When the 2.4GHz RF interface is enabled, the CC1200 is powered down. When the CC1200 is enabled, alternatively the 2.4GHz can be also used if placing an 0Ohm resistor (R19), to connect either via a non-mounted chip antenna, or with an external antenna connected to a non-mounted U.Fl connector with a pigtail.
RF switch state:
void antenna_sw_config | ( | void | ) |
Init function for the antenna switch.
The RE-Mote platform allows to programatically select between the 2.4GHz RF interface of the CC2538, or the Sub-1GHz RF interface of the CC1200. The function is set to enable the Sub-1GHz as default, it should be called from the contiki-main initialization process.
Definition at line 65 of file antenna-sw.c.
References GPIO_SET_OUTPUT, GPIO_SOFTWARE_CONTROL, and GPIO_WRITE_PIN.
Referenced by board_init().
int antenna_sw_get | ( | void | ) |
Function to read the current status of the RF switch.
Definition at line 82 of file antenna-sw.c.
References GPIO_READ_PIN.
Referenced by antenna_sw_select().
int antenna_sw_select | ( | uint8_t | val | ) |
Function to select between the 2.4GHz or Sub-1GHz RF interface.
val | Select antenna. 2.4GHz : ANTENNA_SW_SELECT_2_4GHZ or Sub-1GHz: ANTENNA_SW_SELECT_SUBGHZ |
Definition at line 93 of file antenna-sw.c.
References antenna_sw_get(), and GPIO_WRITE_PIN.