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

Board specific definitions for the IKEA TRÅDFRI modules. More...

Detailed Description

Board specific definitions for the IKEA TRÅDFRI modules.

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file board.h.

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

Xtimer configuration

The timer runs at 250 kHz to increase accuracy, or at 32.768 kHz if LETIMER is used.

#define XTIMER_DEV   (TIMER_DEV(0))
 
#define XTIMER_HZ   (250000UL)
 
#define XTIMER_WIDTH   (16)
 
#define XTIMER_CHAN   (0)
 

LED pin definitions

#define LED0_PIN   GPIO_PIN(PA, 1)
 
#define LED1_PIN   GPIO_PIN(PB, 13)
 

Macros for controlling the on-board LEDs

#define LED0_ON   gpio_set(LED0_PIN)
 
#define LED0_OFF   gpio_clear(LED0_PIN)
 
#define LED0_TOGGLE   gpio_toggle(LED0_PIN)
 
#define LED1_ON   gpio_set(LED1_PIN)
 
#define LED1_OFF   gpio_clear(LED1_PIN)
 
#define LED1_TOGGLE   gpio_toggle(LED1_PIN)
 

Core temperature sensor configuration

Connection to the on-chip temperature sensor.

#define CORETEMP_ADC   ADC_LINE(0)
 

SPI NOR Flash hardware configuration

The board has a IS25LQ020B flash chip (2MBit).

#define IKEA_TRADFRI_NOR_PAGE_SIZE   (256)
 
#define IKEA_TRADFRI_NOR_PAGES_PER_SECTOR   (16)
 
#define IKEA_TRADFRI_NOR_SECTOR_COUNT   (64)
 
#define IKEA_TRADFRI_NOR_FLAGS   (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
 
#define IKEA_TRADFRI_NOR_SPI_DEV   SPI_DEV(0)
 
#define IKEA_TRADFRI_NOR_SPI_CLK   SPI_CLK_1MHZ
 
#define IKEA_TRADFRI_NOR_SPI_CS   GPIO_PIN(PB, 11)
 
#define IKEA_TRADFRI_NOR_SPI_MODE   SPI_MODE_0
 
#define IKEA_TRADFRI_NOR_EN   GPIO_PIN(PF, 3)
 only on the ICC-1-A
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 

Macro Definition Documentation

◆ CORETEMP_ADC

#define CORETEMP_ADC   ADC_LINE(0)

Definition at line 77 of file board.h.

◆ IKEA_TRADFRI_NOR_EN

#define IKEA_TRADFRI_NOR_EN   GPIO_PIN(PF, 3)

only on the ICC-1-A

Definition at line 94 of file board.h.

◆ IKEA_TRADFRI_NOR_FLAGS

#define IKEA_TRADFRI_NOR_FLAGS   (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)

Definition at line 89 of file board.h.

◆ IKEA_TRADFRI_NOR_PAGE_SIZE

#define IKEA_TRADFRI_NOR_PAGE_SIZE   (256)

Definition at line 86 of file board.h.

◆ IKEA_TRADFRI_NOR_PAGES_PER_SECTOR

#define IKEA_TRADFRI_NOR_PAGES_PER_SECTOR   (16)

Definition at line 87 of file board.h.

◆ IKEA_TRADFRI_NOR_SECTOR_COUNT

#define IKEA_TRADFRI_NOR_SECTOR_COUNT   (64)

Definition at line 88 of file board.h.

◆ IKEA_TRADFRI_NOR_SPI_CLK

#define IKEA_TRADFRI_NOR_SPI_CLK   SPI_CLK_1MHZ

Definition at line 91 of file board.h.

◆ IKEA_TRADFRI_NOR_SPI_CS

#define IKEA_TRADFRI_NOR_SPI_CS   GPIO_PIN(PB, 11)

Definition at line 92 of file board.h.

◆ IKEA_TRADFRI_NOR_SPI_DEV

#define IKEA_TRADFRI_NOR_SPI_DEV   SPI_DEV(0)

Definition at line 90 of file board.h.

◆ IKEA_TRADFRI_NOR_SPI_MODE

#define IKEA_TRADFRI_NOR_SPI_MODE   SPI_MODE_0

Definition at line 93 of file board.h.

◆ LED0_OFF

#define LED0_OFF   gpio_clear(LED0_PIN)

Definition at line 64 of file board.h.

◆ LED0_ON

#define LED0_ON   gpio_set(LED0_PIN)

Definition at line 63 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(PA, 1)

Definition at line 55 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   gpio_toggle(LED0_PIN)

Definition at line 65 of file board.h.

◆ LED1_OFF

#define LED1_OFF   gpio_clear(LED1_PIN)

Definition at line 67 of file board.h.

◆ LED1_ON

#define LED1_ON   gpio_set(LED1_PIN)

Definition at line 66 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(PB, 13)

Definition at line 56 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   gpio_toggle(LED1_PIN)

Definition at line 68 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

Definition at line 101 of file board.h.

◆ XTIMER_CHAN

#define XTIMER_CHAN   (0)

Definition at line 48 of file board.h.

◆ XTIMER_DEV

#define XTIMER_DEV   (TIMER_DEV(0))

Definition at line 44 of file board.h.

◆ XTIMER_HZ

#define XTIMER_HZ   (250000UL)

Definition at line 45 of file board.h.

◆ XTIMER_WIDTH

#define XTIMER_WIDTH   (16)

Definition at line 46 of file board.h.