Skip to content

Commit

Permalink
[LR1121] bring up of Ebyte E80 radio on CH32V307 with RadioLib
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Nov 11, 2024
1 parent 8a4e93d commit 3f58f17
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 2 additions & 0 deletions software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ static void lr11xx_setup()
switch (hw_info.model)
{
case SOFTRF_MODEL_STANDALONE:
case SOFTRF_MODEL_ACADEMY:
// Ebyte E80-900M2213S
// LR1121 TCXO Voltage
Vtcxo = 1.8;
Expand Down Expand Up @@ -727,6 +728,7 @@ static void lr11xx_setup()
break;

case SOFTRF_MODEL_STANDALONE:
case SOFTRF_MODEL_ACADEMY:
/* Ebyte E80-900M2213S */
#if 1
radio->setDioAsRfSwitch(0x07, 0x0, 0x02, 0x03, 0x01, 0x0, 0x4, 0x0);
Expand Down
25 changes: 19 additions & 6 deletions software/firmware/source/SoftRF/src/platform/CH32.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,16 @@ struct rst_info {
#if defined(CH32V30x)

/* Peripherals */
#define SOC_GPIO_PIN_CONS_RX PB5
#define SOC_GPIO_PIN_CONS_TX PB8
#if defined(PD6)
#define SOC_GPIO_PIN_CONS_RX PD6
#else
#define SOC_GPIO_PIN_CONS_RX PD_6
#endif
#if defined(PD5)
#define SOC_GPIO_PIN_CONS_TX PD5
#else
#define SOC_GPIO_PIN_CONS_TX PD_5
#endif

#define SOC_GPIO_PIN_GNSS_RX PA10
#define SOC_GPIO_PIN_GNSS_TX PA9
Expand All @@ -110,11 +118,16 @@ struct rst_info {
#define SOC_GPIO_PIN_SCK PB13
#define SOC_GPIO_PIN_SS PB12

//#include <SoftSPI.h>
//extern SoftSPI RadioSPI;
//#undef SPI
//#define SPI RadioSPI
//#define USE_SOFTSPI
#if defined(USE_SOFTSPI)
#include <SoftSPI.h>
extern SoftSPI RadioSPI;
#else
#include <SPI.h>
extern SPIClass RadioSPI;
#endif /* USE_SOFTSPI */
#undef SPI
#define SPI RadioSPI

/* NRF905 */
#define SOC_GPIO_PIN_TXE SOC_UNUSED_PIN
Expand Down

0 comments on commit 3f58f17

Please sign in to comment.