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

Support for the Serpente board. More...

Detailed Description

Support for the Serpente board.

Board specific definitions for the Serpente board

Author
Benjamin Valentin benpi.nosp@m.cco@.nosp@m.googl.nosp@m.emai.nosp@m.l.com

Definition in file board.h.

#include "cpu.h"
#include "periph_conf.h"
#include "periph/gpio.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.

LED pin definitions and handlers

#define LED_PORT   PORT->Group[PA]
 
#define LED0_PIN   GPIO_PIN(PA, 22)
 
#define LED0_MASK   (1 << 22)
 
#define LED0_NAME   "LED(Red)"
 
#define LED0_OFF   (LED_PORT.OUTSET.reg = LED0_MASK)
 
#define LED0_ON   (LED_PORT.OUTCLR.reg = LED0_MASK)
 
#define LED0_TOGGLE   (LED_PORT.OUTTGL.reg = LED0_MASK)
 
#define LED1_PIN   GPIO_PIN(PA, 19)
 
#define LED1_MASK   (1 << 19)
 
#define LED1_NAME   "LED(Green)"
 
#define LED1_OFF   (LED_PORT.OUTSET.reg = LED1_MASK)
 
#define LED1_ON   (LED_PORT.OUTCLR.reg = LED1_MASK)
 
#define LED1_TOGGLE   (LED_PORT.OUTTGL.reg = LED1_MASK)
 
#define LED2_PIN   GPIO_PIN(PA, 23)
 
#define LED2_MASK   (1 << 23)
 
#define LED2_NAME   "LED(Blue)"
 
#define LED2_OFF   (LED_PORT.OUTSET.reg = LED2_MASK)
 
#define LED2_ON   (LED_PORT.OUTCLR.reg = LED2_MASK)
 
#define LED2_TOGGLE   (LED_PORT.OUTTGL.reg = LED2_MASK)
 

Serpente NOR flash hardware configuration

#define SERPENTE_NOR_PAGE_SIZE   (256)
 
#define SERPENTE_NOR_PAGES_PER_SECTOR   (16)
 
#define SERPENTE_NOR_SECTOR_COUNT   (1024)
 
#define SERPENTE_NOR_FLAGS   (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
 
#define SERPENTE_NOR_SPI_DEV   SPI_DEV(0)
 
#define SERPENTE_NOR_SPI_CLK   SPI_CLK_10MHZ
 
#define SERPENTE_NOR_SPI_CS   GPIO_PIN(PA, 15)
 
#define SERPENTE_NOR_SPI_MODE   SPI_MODE_3
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 

USB configuration

#define INTERNAL_PERIPHERAL_VID   (0x239A)
 
#define INTERNAL_PERIPHERAL_PID   (0x0057)
 

Macro Definition Documentation

◆ INTERNAL_PERIPHERAL_PID

#define INTERNAL_PERIPHERAL_PID   (0x0057)

Definition at line 89 of file board.h.

◆ INTERNAL_PERIPHERAL_VID

#define INTERNAL_PERIPHERAL_VID   (0x239A)

Definition at line 88 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 22)

Definition at line 39 of file board.h.

◆ LED0_NAME

#define LED0_NAME   "LED(Red)"

Definition at line 40 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (LED_PORT.OUTSET.reg = LED0_MASK)

Definition at line 42 of file board.h.

◆ LED0_ON

#define LED0_ON   (LED_PORT.OUTCLR.reg = LED0_MASK)

Definition at line 43 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(PA, 22)

Definition at line 38 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   (LED_PORT.OUTTGL.reg = LED0_MASK)

Definition at line 44 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 19)

Definition at line 47 of file board.h.

◆ LED1_NAME

#define LED1_NAME   "LED(Green)"

Definition at line 48 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (LED_PORT.OUTSET.reg = LED1_MASK)

Definition at line 50 of file board.h.

◆ LED1_ON

#define LED1_ON   (LED_PORT.OUTCLR.reg = LED1_MASK)

Definition at line 51 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(PA, 19)

Definition at line 46 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   (LED_PORT.OUTTGL.reg = LED1_MASK)

Definition at line 52 of file board.h.

◆ LED2_MASK

#define LED2_MASK   (1 << 23)

Definition at line 55 of file board.h.

◆ LED2_NAME

#define LED2_NAME   "LED(Blue)"

Definition at line 56 of file board.h.

◆ LED2_OFF

#define LED2_OFF   (LED_PORT.OUTSET.reg = LED2_MASK)

Definition at line 58 of file board.h.

◆ LED2_ON

#define LED2_ON   (LED_PORT.OUTCLR.reg = LED2_MASK)

Definition at line 59 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(PA, 23)

Definition at line 54 of file board.h.

◆ LED2_TOGGLE

#define LED2_TOGGLE   (LED_PORT.OUTTGL.reg = LED2_MASK)

Definition at line 60 of file board.h.

◆ LED_PORT

#define LED_PORT   PORT->Group[PA]

Definition at line 36 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

Definition at line 81 of file board.h.

◆ SERPENTE_NOR_FLAGS

#define SERPENTE_NOR_FLAGS   (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)

Definition at line 70 of file board.h.

◆ SERPENTE_NOR_PAGE_SIZE

#define SERPENTE_NOR_PAGE_SIZE   (256)

Definition at line 67 of file board.h.

◆ SERPENTE_NOR_PAGES_PER_SECTOR

#define SERPENTE_NOR_PAGES_PER_SECTOR   (16)

Definition at line 68 of file board.h.

◆ SERPENTE_NOR_SECTOR_COUNT

#define SERPENTE_NOR_SECTOR_COUNT   (1024)

Definition at line 69 of file board.h.

◆ SERPENTE_NOR_SPI_CLK

#define SERPENTE_NOR_SPI_CLK   SPI_CLK_10MHZ

Definition at line 72 of file board.h.

◆ SERPENTE_NOR_SPI_CS

#define SERPENTE_NOR_SPI_CS   GPIO_PIN(PA, 15)

Definition at line 73 of file board.h.

◆ SERPENTE_NOR_SPI_DEV

#define SERPENTE_NOR_SPI_DEV   SPI_DEV(0)

Definition at line 71 of file board.h.

◆ SERPENTE_NOR_SPI_MODE

#define SERPENTE_NOR_SPI_MODE   SPI_MODE_3

Definition at line 74 of file board.h.