Skip to content

Commit

Permalink
boards/b-l072z-lrwan1: add sx1276 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Jul 7, 2017
1 parent 959d398 commit 5450602
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boards/b-l072z-lrwan1/board.c
Expand Up @@ -27,6 +27,12 @@ void board_init(void)
/* initialize the CPU */
cpu_init();

#if defined(MODULE_SX1276)
/* Enable TCXO */
gpio_init(RADIO_TCXO_VCC_PIN, GPIO_OUT);
gpio_set(RADIO_TCXO_VCC_PIN);
#endif

#ifdef AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
Expand Down
16 changes: 16 additions & 0 deletions boards/b-l072z-lrwan1/include/board.h
Expand Up @@ -38,6 +38,22 @@ extern "C" {
#define XTIMER_WIDTH (16)
/** @} */

/**
* @name sx1276 configuration
* @{
*/
#define SX127X_PARAM_SPI (SPI_DEV(1))
#define SX127X_PARAM_SPI_NSS GPIO_PIN(PORT_A, 15)

#define SX127X_PARAM_RESET GPIO_PIN(PORT_C, 0)
#define SX127X_PARAM_DIO0 GPIO_PIN(PORT_B, 4)
#define SX127X_PARAM_DIO1 GPIO_PIN(PORT_B, 1)
#define SX127X_PARAM_DIO2 GPIO_PIN(PORT_B, 0)
#define SX127X_PARAM_DIO3 GPIO_PIN(PORT_C, 13)

#define RADIO_TCXO_VCC_PIN GPIO_PIN(PORT_A, 12)
/** @} */

/**
* @name LED pin definitions and handlers
* @{
Expand Down

0 comments on commit 5450602

Please sign in to comment.