Skip to content

Commit

Permalink
Added USE_EXT_ANTENNA define. Disabled RSSI_ACK_PACKET.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbeanton committed Oct 11, 2018
1 parent 6331295 commit 6a6c00e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NRF_S110 ?= s110

INCLUDES= -I Include -I Include/gcc -Iinterface

CONFIG = -DRSSI_ACK_PACKET
#CONFIG = -DRSSI_ACK_PACKET
BUILD_OPTION = -g3 -O0 -Wall -fsingle-precision-constant -ffast-math -std=gnu11
PERSONAL_DEFINES ?=

Expand Down
15 changes: 12 additions & 3 deletions src/pm_cf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#define HAS_TI_CHARGER
#define HAS_BAT_SINK
//#define ENABLE_FAST_CHARGE_1A

static PmState state;
static PmState targetState;
Expand Down Expand Up @@ -191,12 +192,15 @@ static void pmRunSystem(bool enable)
#ifdef HAS_TI_CHARGER
nrf_gpio_cfg_output(PM_EN1);
nrf_gpio_cfg_output(PM_EN2);
#ifdef ENABLE_FAST_CHARGE_1A
// 980mA current
nrf_gpio_pin_clear(PM_EN1);
nrf_gpio_pin_set(PM_EN2);
#else
// Set 500mA current
nrf_gpio_pin_set(PM_EN1);
nrf_gpio_pin_clear(PM_EN2);
// 980mA current
// nrf_gpio_pin_clear(PM_EN1);
// nrf_gpio_pin_set(PM_EN2);
#endif

// Enable charging
nrf_gpio_cfg_output(PM_CHG_EN);
Expand All @@ -208,8 +212,13 @@ static void pmRunSystem(bool enable)
nrf_gpio_cfg_output(RADIO_PA_RX_EN);
nrf_gpio_cfg_output(RADIO_PA_MODE);
nrf_gpio_cfg_output(RADIO_PA_ANT_SW);
#ifdef USE_EXT_ANTENNA
// Select u.FL antenna
nrf_gpio_pin_clear(RADIO_PA_ANT_SW);
#else
// Select chip antenna
nrf_gpio_pin_set(RADIO_PA_ANT_SW);
#endif

#ifdef RFX2411N_BYPASS_MODE
nrf_gpio_pin_set(RADIO_PA_MODE);
Expand Down
1 change: 1 addition & 0 deletions src/pm_cf21.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
* License along with this library.
*/
#define HAS_RFX2411N
//#define USE_EXT_ANTENNA

#include "pm_cf2.c"

0 comments on commit 6a6c00e

Please sign in to comment.