Skip to content
Commits on Source (5)
......@@ -21,6 +21,15 @@ config GENERICRADIO_SI4463
if GENERICRADIO_SI4463
config GENERICRADIO_SI4463_ANTSWITCH_ALT
bool "Alternate TX/RX switching using dedicated GPIO setup"
default n
---help---
The si4463 has the ability to drive GPIO pins to activate PA/LNA, but these are only active high,
with no internal way to invert the signals. If inverted signals are required, and you cant invert
the signals with external hardware, use this option, but be aware that TX/RX switching time will
be slower since a GPIO setup command has to be sent via before/after each transmission and reception.
choice
prompt "Packet framing"
default GENERICRADIO_SI4463_FRAMING_L2B
......
This diff is collapsed.
/****************************************************************************
* drivers/wireless/generic/si4463.h
*
* Copyright (C) 2017 Sebastien Lorquet. All rights reserved.
* Copyright (C) 2017-2018 Sebastien Lorquet. All rights reserved.
* Author: Sebastien Lorquet <sebastien@lorquet.fr>
*
* Redistribution and use in source and binary forms, with or without
......@@ -181,14 +181,14 @@ end_packed_struct;
#define PINCFG_DRIVE1 3
#define PINCFG_INPUT 4
#define PINCFG_32K_CLK 5
#define PINCFG_GPIO_BOOT_CLK 6
#define PINCFG_BOOT_CLK 6
#define PINCFG_DIV_CLK 7
#define PINCFG_CTS 8
#define PINCFG_GPIO_INV_CTS 9
#define PINCFG_GPIO_CMD_OVERLAP 10
#define PINCFG_INV_CTS 9
#define PINCFG_CMD_OVERLAP 10
#define PINCFG_SDO 11
#define PINCFG_POR 12
#define PINCFG_GPIO_CAL_WUT 13
#define PINCFG_CAL_WUT 13
#define PINCFG_WUT 14
#define PINCFG_EN_PA 15
#define PINCFG_TX_DATA_CLK 16
......@@ -203,17 +203,17 @@ end_packed_struct;
#define PINCFG_INVALID_PREAMBLE 25
#define PINCFG_SYNC_WORD_DETECT 26
#define PINCFG_CCA 27
#define PINCFG_GPIO_IN_SLEEP 28
#define PINCFG_IN_SLEEP 28
#define PINCFG_PKT_TRACE 29
#define PINCFG_TX_RX_DATA_CLK 31
#define PINCFG_GPIO_TX_STATE 32
#define PINCFG_GPIO_RX_STATE 33
#define PINCFG_GPIO_RX_FIFO_FULL 34
#define PINCFG_GPIO_TX_FIFO_EMPTY 35
#define PINCFG_GPIO_LOW_BATT 36
#define PINCFG_GPIO_CCA_LATCH 37
#define PINCFG_GPIO_HOPPED 38
#define PINCFG_GPIO_HOP_TABLE_WRAP 39
#define PINCFG_TX_STATE 32
#define PINCFG_RX_STATE 33
#define PINCFG_RX_FIFO_FULL 34
#define PINCFG_TX_FIFO_EMPTY 35
#define PINCFG_LOW_BATT 36
#define PINCFG_CCA_LATCH 37
#define PINCFG_HOPPED 38
#define PINCFG_HOP_TABLE_WRAP 39
#define PINCFG_NIRQ_NIRQ 39
#define DRV_STRENGTH_HIGH (0<<5)
......@@ -453,7 +453,7 @@ end_packed_struct;
#define STARTRX_CONDITION_WUT (1 << 0)
#define STARTRX_CONDITION_IMMEDIATE (1 << 0)
#define STARTRX_CONDITION_IMMEDIATE (0 << 0)
#define STARTRX_STATE_NOCHANGE 0
#define STARTRX_STATE_SLEEP 1
#define STARTRX_STATE_SPI_ACTIVE 2
......
......@@ -107,15 +107,17 @@ extern "C"
struct spi_dev_s; /* Forward reference */
FAR struct genradio_dev_s *si4463_init(FAR struct spi_dev_s *spi, int devnum,
uint32_t xtal, int papin, int lnapin,
bool pininvert,
FAR const struct si4463_lower_s *lower);
/* these wrappers can be used to initialize radio modules with known xtals */
/* these wrappers can be used to initialize radio modules with known params */
/* RFM26 has a 30 MHz crystal and active-low antenna switch control */
static inline FAR struct genradio_dev_s *
RFM26_init(FAR struct spi_dev_s *spi, int devnum, int papin, int lnapin,
FAR const struct si4463_lower_s *lower)
{
return si4463_init(spi, devnum, 30000000, papin, lnapin, lower);
return si4463_init(spi, devnum, 30000000, papin, lnapin, true, lower);
}
......