Loading...
Searching...
No Matches
board.h File Reference

Board specific definitions for the SeeedStudio GD32 RISC-V board. More...

Detailed Description

Board specific definitions for the SeeedStudio GD32 RISC-V board.

Author
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file board.h.

#include "board_common.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Button pin definitions

#define BTN0_PIN   GPIO_PIN(PORT_A, 0)
 
#define BTN0_MODE   GPIO_IN
 
#define BTN0_INT_FLANK   GPIO_RISING
 
#define BTN1_PIN   GPIO_PIN(PORT_C, 13)
 
#define BTN1_MODE   GPIO_IN
 
#define BTN1_INT_FLANK   GPIO_RISING
 

LED (on-board) configuration

#define LED0_PIN   GPIO_PIN(PORT_B, 5)
 
#define LED0_MASK   (1 << 5)
 
#define LED0_ON   (GPIOB->BC = LED0_MASK)
 
#define LED0_OFF   (GPIOB->BOP = LED0_MASK)
 
#define LED0_TOGGLE   (GPIOB->OCTL ^= LED0_MASK)
 
#define LED1_PIN   GPIO_PIN(PORT_B, 0)
 
#define LED1_MASK   (1 << 0)
 
#define LED1_ON   (GPIOB->BC = LED1_MASK)
 
#define LED1_OFF   (GPIOB->BOP = LED1_MASK)
 
#define LED1_TOGGLE   (GPIOB->OCTL ^= LED1_MASK)
 
#define LED2_PIN   GPIO_PIN(PORT_B, 1)
 
#define LED2_MASK   (1 << 1)
 
#define LED2_ON   (GPIOB->BC = LED2_MASK)
 
#define LED2_OFF   (GPIOB->BOP = LED2_MASK)
 
#define LED2_TOGGLE   (GPIOB->OCTL ^= LED2_MASK)
 
#define LED_RED_PIN   LED0_PIN
 LED0 is red.
 
#define LED_GREEN_PIN   LED1_PIN
 LED1 is green.
 
#define LED_BLUE_PIN   LED2_PIN
 LED2 is blue.
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 MTD device for the SD Card.
 

SD-Card interface configuration

#define SDCARD_SPI_PARAM_SPI   SPI_DEV(0)
 
#define SDCARD_SPI_PARAM_CS   GPIO_PIN(PORT_B, 12)
 
#define SDCARD_SPI_PARAM_CLK   GPIO_PIN(PORT_B, 13)
 
#define SDCARD_SPI_PARAM_MISO   GPIO_PIN(PORT_B, 14)
 
#define SDCARD_SPI_PARAM_MOSI   GPIO_PIN(PORT_B, 15)
 

Macro Definition Documentation

◆ BTN0_INT_FLANK

#define BTN0_INT_FLANK   GPIO_RISING

Definition at line 36 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN

Definition at line 35 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(PORT_A, 0)

Definition at line 34 of file board.h.

◆ BTN1_INT_FLANK

#define BTN1_INT_FLANK   GPIO_RISING

Definition at line 40 of file board.h.

◆ BTN1_MODE

#define BTN1_MODE   GPIO_IN

Definition at line 39 of file board.h.

◆ BTN1_PIN

#define BTN1_PIN   GPIO_PIN(PORT_C, 13)

Definition at line 38 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 5)

Definition at line 48 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (GPIOB->BOP = LED0_MASK)

Definition at line 50 of file board.h.

◆ LED0_ON

#define LED0_ON   (GPIOB->BC = LED0_MASK)

Definition at line 49 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(PORT_B, 5)

Definition at line 47 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   (GPIOB->OCTL ^= LED0_MASK)

Definition at line 51 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 0)

Definition at line 54 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (GPIOB->BOP = LED1_MASK)

Definition at line 56 of file board.h.

◆ LED1_ON

#define LED1_ON   (GPIOB->BC = LED1_MASK)

Definition at line 55 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(PORT_B, 0)

Definition at line 53 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   (GPIOB->OCTL ^= LED1_MASK)

Definition at line 57 of file board.h.

◆ LED2_MASK

#define LED2_MASK   (1 << 1)

Definition at line 60 of file board.h.

◆ LED2_OFF

#define LED2_OFF   (GPIOB->BOP = LED2_MASK)

Definition at line 62 of file board.h.

◆ LED2_ON

#define LED2_ON   (GPIOB->BC = LED2_MASK)

Definition at line 61 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(PORT_B, 1)

Definition at line 59 of file board.h.

◆ LED2_TOGGLE

#define LED2_TOGGLE   (GPIOB->OCTL ^= LED2_MASK)

Definition at line 63 of file board.h.

◆ LED_BLUE_PIN

#define LED_BLUE_PIN   LED2_PIN

LED2 is blue.

Definition at line 67 of file board.h.

◆ LED_GREEN_PIN

#define LED_GREEN_PIN   LED1_PIN

LED1 is green.

Definition at line 66 of file board.h.

◆ LED_RED_PIN

#define LED_RED_PIN   LED0_PIN

LED0 is red.

Definition at line 65 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

MTD device for the SD Card.

Definition at line 74 of file board.h.

◆ SDCARD_SPI_PARAM_CLK

#define SDCARD_SPI_PARAM_CLK   GPIO_PIN(PORT_B, 13)

Definition at line 83 of file board.h.

◆ SDCARD_SPI_PARAM_CS

#define SDCARD_SPI_PARAM_CS   GPIO_PIN(PORT_B, 12)

Definition at line 82 of file board.h.

◆ SDCARD_SPI_PARAM_MISO

#define SDCARD_SPI_PARAM_MISO   GPIO_PIN(PORT_B, 14)

Definition at line 84 of file board.h.

◆ SDCARD_SPI_PARAM_MOSI

#define SDCARD_SPI_PARAM_MOSI   GPIO_PIN(PORT_B, 15)

Definition at line 85 of file board.h.

◆ SDCARD_SPI_PARAM_SPI

#define SDCARD_SPI_PARAM_SPI   SPI_DEV(0)

Definition at line 81 of file board.h.