mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
a73bee8138
Fix board define to TCXO: Temperature Compensated eXternal Oscillator
62 lines
1.3 KiB
C
62 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2019 Mesotic SAS
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
* directory for more details.
|
|
*/
|
|
|
|
/**
|
|
* @ingroup boards_samr34-xpro
|
|
* @{
|
|
*
|
|
* @file board.c
|
|
* @brief Board specific implementations for the Microchip
|
|
* SAM R34 Xplained Pro board
|
|
*
|
|
* @author Dylan Laduranty <dylan.laduranty@mesotic.com>
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "board.h"
|
|
#include "cpu.h"
|
|
#include "periph/gpio.h"
|
|
|
|
#ifdef MODULE_SX127X
|
|
#include "sx127x_params.h"
|
|
#endif
|
|
|
|
void led_init(void);
|
|
|
|
void board_init(void)
|
|
{
|
|
/* initialize the CPU */
|
|
cpu_init();
|
|
|
|
/* initialize the boards LEDs */
|
|
led_init();
|
|
|
|
/* initialize board specific pins for LoRa */
|
|
#ifdef MODULE_SX127X
|
|
gpio_init(TCXO_PWR_PIN, GPIO_OUT);
|
|
gpio_set(TCXO_PWR_PIN);
|
|
gpio_init(TX_OUTPUT_SEL_PIN, GPIO_OUT);
|
|
gpio_write(TX_OUTPUT_SEL_PIN, !SX127X_PARAM_PASELECT);
|
|
#endif /* USEMODULE_SX127X */
|
|
}
|
|
|
|
|
|
/**
|
|
* @brief Initialize the boards on-board LED
|
|
*/
|
|
void led_init(void)
|
|
{
|
|
gpio_init(LED0_PIN, GPIO_OUT);
|
|
gpio_set(LED0_PIN); /* gpio is inverted => clear */
|
|
gpio_init(LED1_PIN, GPIO_OUT);
|
|
gpio_set(LED1_PIN); /* gpio is inverted => clear */
|
|
}
|