Skip to content

Commit

Permalink
boards/sipeed-longan-nano: update due to I2C/SPI default config cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Aug 6, 2023
1 parent ba29a5e commit 237819e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions boards/sipeed-longan-nano/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @{
*
* @file
* @brief Board specific definitions for the SeeedStudio GD32 RISC-V board
* @brief Board specific definitions for the Sipeed Longan Nano board
*
* @author Gunar Schorcht <[email protected]>
*/
Expand All @@ -33,8 +33,16 @@
#define CONFIG_CLOCK_HXTAL MHZ(8) /**< HXTAL frequency */
#endif

#ifndef SPI_DEV_1_USED
#if defined(BOARD_SIPEED_LONGAN_NANO_TFT)
#define SPI_DEV_1_USED /**< Enable SPI_DEV(1) if TFT is connected */
#define SPI_DEV_1_USED 1 /**< Enable SPI_DEV(1) by default for the TFT version */
#else
#define SPI_DEV_1_USED 0 /**< Disable SPI_DEV(1) by default for the non-TFT version */
#endif
#endif

#ifndef I2C_DEV_1_USED
#define I2C_DEV_1_USED 1 /**< Enable I2C_DEV(1) by default */
#endif

#include "periph_cpu.h"
Expand Down Expand Up @@ -110,7 +118,7 @@ static const pwm_conf_t pwm_config[] = {
.af = GPIO_AF_OUT_PP,
.bus = APB1,
},
#if !defined(MODULE_PERIPH_CAN)
#if !MODULE_PERIPH_CAN
{
.dev = TIMER3,
.rcu_mask = RCU_APB1EN_TIMER3EN_Msk,
Expand Down

0 comments on commit 237819e

Please sign in to comment.