1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

boards/b-l072z-lrwan1: add sx1276 configuration

This commit is contained in:
Alexandre Abadie 2017-06-15 13:24:17 +02:00
parent 959d3982f5
commit 5450602549
2 changed files with 22 additions and 0 deletions

View File

@ -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 */

View File

@ -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
* @{