Skip to content

Commit

Permalink
- Updated keywords.txt file
Browse files Browse the repository at this point in the history
- Added support for Saboten v1.1 at 900 MHz
- Added feature to turn off amps for sleep mode on long range board
  • Loading branch information
unknown authored and unknown committed Oct 25, 2013
1 parent 1e0034e commit beebb52
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 14 deletions.
Binary file modified HOWTO Using the chibiArduino Wireless Protocol Stack.pdf
Binary file not shown.
38 changes: 25 additions & 13 deletions keywords.txt
Expand Up @@ -9,24 +9,36 @@
#######################################
# Methods and Functions (KEYWORD2)
#######################################
chibiInit KEYWORD2
chibiInit KEYWORD2
chibiSetShortAddr KEYWORD2
chibiGetShortAddr KEYWORD2
chibiSetIEEEAddr KEYWORD2
chibiGetIEEEAddr KEYWORD2
chibiRegRead KEYWORD2
chibiRegWrite KEYWORD2
chibiRegRead KEYWORD2
chibiRegWrite KEYWORD2
chibiTx KEYWORD2
chibiDataRcvd KEYWORD2
chibiGetData KEYWORD2
chibiGetRSSI KEYWORD2
chibiGetSrcAddr KEYWORD2
chibiSetChannel KEYWORD2
chibiSleepRadio KEYWORD2
chibiCmdInit KEYWORD2
chibiCmdPoll KEYWORD2
chibiCmdAdd KEYWORD2
chibiCmdStr2Num KEYWORD2
chibiDataRcvd KEYWORD2
chibiGetData KEYWORD2
chibiGetRSSI KEYWORD2
chibiGetSrcAddr KEYWORD2
chibiSetChannel KEYWORD2
chibiSleepRadio KEYWORD2
chibiCmdInit KEYWORD2
chibiCmdPoll KEYWORD2
chibiCmdAdd KEYWORD2
chibiCmdStr2Num KEYWORD2
chibiGetPartID KEYWORD2
chibiAesInit KEYWORD2
chibiAesEncrypt KEYWORD2
chibiAesDecrypt KEYWORD2
chibiSetDataRate KEYWORD2
chibiGetRand KEYWORD2
chibiSetMode KEYWORD2
chibiHighGainModeEnable KEYWORD2
chibiHighGainModeDisable KEYWORD2




#######################################
# Constants (LITERAL1)
Expand Down
17 changes: 16 additions & 1 deletion src/chb_drvr.c
Expand Up @@ -757,7 +757,7 @@ static void chb_radio_init()
chb_reg_read_mod_write(TRX_CTRL1, 1 << 5, 1 << 5);
#endif

#if (FREAKDUINO_LONG_RANGE == 1)
#if ((FREAKDUINO_LONG_RANGE == 1) || (SABOTEN == 1))
// enable the rf front end controller
tmp = chibiRegRead(TRX_CTRL1);
tmp |= 0x80;
Expand All @@ -775,6 +775,9 @@ static void chb_radio_init()
#if (ARASHI_ENET_GATEWAY == 1)
DDRC |= 1<<5;
PORTC |= 1<<5;
#elif (SABOTEN == 1)
DDRC |= 1<<6;
PORTC |= 1<<6;
#else
DDRB |= 1<<7;
PORTB |= (1<<7);
Expand Down Expand Up @@ -862,10 +865,17 @@ void chb_drvr_init()
/**************************************************************************/
void chb_sleep(U8 enb)
{
uint8_t tmp;

if (enb)
{
// if we're using a long range device, disable the high gain mode pin
#if (FREAKDUINO_LONG_RANGE == 1)
// disable RF front end
tmp = chibiRegRead(TRX_CTRL1);
tmp &= ~(0x80);
chibiRegWrite(TRX_CTRL1, tmp);

chb_high_gain_mode_disable();
#endif

Expand All @@ -884,6 +894,11 @@ void chb_sleep(U8 enb)
{
// if we're using a long range device, enable the high gain mode pin
#if (FREAKDUINO_LONG_RANGE == 1)
// enable the RF front end
tmp = chibiRegRead(TRX_CTRL1);
tmp |= 0x80;
chibiRegWrite(TRX_CTRL1, tmp);

chb_high_gain_mode_enable();
#endif

Expand Down

0 comments on commit beebb52

Please sign in to comment.