board.h File Reference

Board specific definitions for the Adafruit PyBadge. More...

Detailed Description

Board specific definitions for the Adafruit PyBadge.

Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file board.h.

#include "cpu.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 LED0_PIN   GPIO_PIN(PA, 23)
 LED0 pin.
 
#define LED_PORT   PORT->Group[PA]
 LED0 port.
 
#define LED0_MASK   (1 << 23)
 LED0 mask.
 
#define LED0_ON   (LED_PORT.OUTSET.reg = LED0_MASK)
 LED0 on macro.
 
#define LED0_OFF   (LED_PORT.OUTCLR.reg = LED0_MASK)
 LED0 off macro.
 
#define LED0_TOGGLE   (LED_PORT.OUTTGL.reg = LED0_MASK)
 LED0 toggle macro.
 
#define LED0_NAME   "LED(Red)"
 LED0 name.
 

Buttons control (TI SN74HC165 shift register)

#define BUTTON_LATCH   GPIO_PIN(PB, 0)
 Latch pin.
 
#define BUTTON_CLK   GPIO_PIN(PB, 31)
 Clock pin.
 
#define BUTTON_OUT   GPIO_PIN(PB, 30)
 Serial output pin.
 

Backlight control

#define BACKLIGHT_PIN   GPIO_PIN(PA, 1)
 Backlight pin.
 
#define BACKLIGHT_PORT   PORT->Group[PA]
 Backlight pin port.
 
#define BACKLIGHT_MASK   (1 << 1)
 Backlight pin mask.
 
#define BACKLIGHT_ON   (BACKLIGHT_PORT.OUTSET.reg = BACKLIGHT_MASK)
 Turn backlight on.
 
#define BACKLIGHT_OFF   (BACKLIGHT_PORT.OUTCLR.reg = BACKLIGHT_MASK)
 Turn backlight off.
 

Display configuration (not supported yet)

#define ST77XX_PARAM_CNTRL   ST77XX_CNTRL_ST7735
 ST77xx controller variant.
 
#define ST77XX_PARAM_SPI   SPI_DEV(1)
 SPI device.
 
#define ST77XX_PARAM_CS   GPIO_PIN(PB, 7)
 Chip select pin.
 
#define ST77XX_PARAM_DCX   GPIO_PIN(PB, 5)
 DCX pin.
 
#define ST77XX_PARAM_RST   GPIO_PIN(PA, 0)
 Reset pin.
 
#define ST77XX_PARAM_NUM_LINES   (160U)
 Number of screen lines.
 
#define ST77XX_PARAM_RGB_CHANNELS   (128U)
 Number of screen rgb channel (height)
 
#define ST77XX_PARAM_RGB   (1)
 RGB configuration.
 
#define ST77XX_PARAM_INVERTED   (0)
 Inversion configuration.
 
#define ST77XX_PARAM_ROTATION   ST77XX_ROTATION_90
 Rotation mode.
 
#define LCD_SCREEN_WIDTH   (ST77XX_PARAM_NUM_LINES)
 LCD screen width.
 
#define LCD_SCREEN_HEIGHT   (ST77XX_PARAM_RGB_CHANNELS)
 LCD screen height.
 

Neopixel LEDs (not supported yet)

#define WS281X_PARAM_PIN   (GPIO_PIN(PA, 15))
 GPIO pin connected to the data pin of the first LED.
 
#define WS281X_PARAM_NUMOF   (5U)
 Number of LEDs chained.
 

Speaker (supported via DAC DDS module)

#define SPEAKER_ENABLE_PIN   GPIO_PIN(PA, 27)
 Speaker enable pin.
 
#define SPEAKER_PIN   GPIO_PIN(PA, 2)
 Speaker pin (A0)
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 MTD_0 constant.
 

Xtimer configuration

#define XTIMER_WIDTH   (32)
 Default timer is 32bit width.
 
#define XTIMER_HZ   (1000000ul)
 Default timer runs at 1MHz.