Contiki-NG

Driver for the RE-Mote RF antenna switch, to enable either the internal ceramic antenna or an external one connected to the uFL connector. More...

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. More...
 
int antenna_sw_get (void)
 Function to read the current status of the RF switch. More...
 
int antenna_sw_select (uint8_t val)
 Function to select between the 2.4GHz or Sub-1GHz RF interface. More...
 

Detailed Description

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:

Function Documentation

◆ antenna_sw_config()

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_SOFTWARE_CONTROL.

Referenced by board_init().

◆ antenna_sw_get()

int antenna_sw_get ( void  )

Function to read the current status of the RF switch.

Returns
the selected antenna position, or ANTENNA_SW_SELECT_ERROR if not previously configured

Definition at line 82 of file antenna-sw.c.

◆ antenna_sw_select()

int antenna_sw_select ( uint8_t  val)

Function to select between the 2.4GHz or Sub-1GHz RF interface.

Parameters
valSelect antenna. 2.4GHz : ANTENNA_SW_SELECT_2_4GHZ or Sub-1GHz: ANTENNA_SW_SELECT_SUBGHZ
Returns
the selected antenna position, or ANTENNA_SW_SELECT_ERROR if not previously configured

Definition at line 93 of file antenna-sw.c.