Loading...
Searching...
No Matches
periph_conf.h File Reference
#include "periph_cpu.h"
+ Include dependency graph for periph_conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Clock system configuration

#define CLOCK_CORECLOCK   ( 8000000ul)
 
#define CLOCK_MCGIRCLK   ( 8000000ul)
 
#define CLOCK_BUSCLOCK   (CLOCK_CORECLOCK / 1)
 
static const clock_config_t clock_config
 

Timer configuration

#define PIT_NUMOF   (1U)
 
#define PIT_CONFIG
 
#define LPTMR_NUMOF   (1U)
 
#define LPTMR_CONFIG
 
#define TIMER_NUMOF   ((PIT_NUMOF) + (LPTMR_NUMOF))
 
#define PIT_BASECLOCK   (CLOCK_BUSCLOCK)
 
#define PIT_ISR_0   isr_pit1
 
#define LPTMR_ISR_0   isr_lptmr0
 

UART configuration

#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
#define LPUART_0_ISR   isr_lpuart0
 
#define LPUART_0_SRC   3
 
static const uart_conf_t uart_config []
 

ADC configuration

#define ADC_NUMOF   ARRAY_SIZE(adc_config)
 
#define ADC_REF_SETTING   0
 
static const adc_conf_t adc_config []
 

I2C configuration

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 
#define I2C_0_ISR   isr_i2c0
 
#define I2C_1_ISR   isr_i2c1
 
static const i2c_conf_t i2c_config []
 

Macro Definition Documentation

◆ ADC_NUMOF

#define ADC_NUMOF   ARRAY_SIZE(adc_config)

Definition at line 131 of file periph_conf.h.

◆ ADC_REF_SETTING

#define ADC_REF_SETTING   0

Definition at line 138 of file periph_conf.h.

◆ CLOCK_BUSCLOCK

#define CLOCK_BUSCLOCK   (CLOCK_CORECLOCK / 1)

Definition at line 62 of file periph_conf.h.

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   ( 8000000ul)

Definition at line 60 of file periph_conf.h.

◆ CLOCK_MCGIRCLK

#define CLOCK_MCGIRCLK   ( 8000000ul)

Definition at line 61 of file periph_conf.h.

◆ I2C_0_ISR

#define I2C_0_ISR   isr_i2c0

Definition at line 168 of file periph_conf.h.

◆ I2C_1_ISR

#define I2C_1_ISR   isr_i2c1

Definition at line 169 of file periph_conf.h.

◆ I2C_NUMOF

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Definition at line 167 of file periph_conf.h.

◆ LPTMR_CONFIG

#define LPTMR_CONFIG
Value:
{ \
{ \
.dev = LPTMR0, \
.irqn = LPTMR0_IRQn, \
.src = 2, \
.base_freq = 32768u, \
}, \
}

Definition at line 77 of file periph_conf.h.

◆ LPTMR_ISR_0

#define LPTMR_ISR_0   isr_lptmr0

Definition at line 89 of file periph_conf.h.

◆ LPTMR_NUMOF

#define LPTMR_NUMOF   (1U)

Definition at line 76 of file periph_conf.h.

◆ LPUART_0_ISR

#define LPUART_0_ISR   isr_lpuart0

Definition at line 112 of file periph_conf.h.

◆ LPUART_0_SRC

#define LPUART_0_SRC   3

Definition at line 114 of file periph_conf.h.

◆ PIT_BASECLOCK

#define PIT_BASECLOCK   (CLOCK_BUSCLOCK)

Definition at line 87 of file periph_conf.h.

◆ PIT_CONFIG

#define PIT_CONFIG
Value:
{ \
{ \
.prescaler_ch = 0, \
.count_ch = 1, \
}, \
}

Definition at line 70 of file periph_conf.h.

◆ PIT_ISR_0

#define PIT_ISR_0   isr_pit1

Definition at line 88 of file periph_conf.h.

◆ PIT_NUMOF

#define PIT_NUMOF   (1U)

Definition at line 69 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ((PIT_NUMOF) + (LPTMR_NUMOF))

Definition at line 85 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 111 of file periph_conf.h.

Variable Documentation

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{ .dev = ADC0, .pin = GPIO_PIN(PORT_B, 0), .chan = 8, .avg = ADC_AVG_MAX },
{ .dev = ADC0, .pin = GPIO_PIN(PORT_B, 1), .chan = 9, .avg = ADC_AVG_MAX },
{ .dev = ADC0, .pin = GPIO_PIN(PORT_B, 2), .chan = 15, .avg = ADC_AVG_MAX },
{ .dev = ADC0, .pin = GPIO_PIN(PORT_B, 3), .chan = 4, .avg = ADC_AVG_MAX },
{ .dev = ADC0, .pin = GPIO_PIN(PORT_C, 2), .chan = 11, .avg = ADC_AVG_MAX },
{ .dev = ADC0, .pin = GPIO_PIN(PORT_C, 1), .chan = 15, .avg = ADC_AVG_MAX },
}
@ PORT_B
port B
Definition periph_cpu.h:48
@ PORT_C
port C
Definition periph_cpu.h:49
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
#define ADC_AVG_MAX
Maximum hardware averaging (32 samples)
Definition periph_cpu.h:374

Definition at line 121 of file periph_conf.h.

◆ clock_config

const clock_config_t clock_config
static
Initial value:
= {
.clkdiv1 = SIM_CLKDIV1_OUTDIV1(0) | SIM_CLKDIV1_OUTDIV4(0),
.rtc_clc = RTC_CR_SC8P_MASK | RTC_CR_SC4P_MASK,
.osc32ksel = SIM_SOPT1_OSC32KSEL(0),
.clock_flags =
KINETIS_CLOCK_RTCOSC_EN |
KINETIS_CLOCK_USE_FAST_IRC |
KINETIS_CLOCK_MCGIRCLK_EN |
KINETIS_CLOCK_MCGIRCLK_STOP_EN |
0,
.default_mode = KINETIS_MCG_MODE_LIRC8M,
.erc_range = KINETIS_MCG_ERC_RANGE_LOW,
.osc_clc = 0,
.fcrdiv = MCG_SC_FCRDIV(0),
.lirc_div2 = MCG_MC_LIRC_DIV2(0),
}

Definition at line 33 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.i2c = I2C0,
.scl_pin = GPIO_PIN(PORT_E, 24),
.sda_pin = GPIO_PIN(PORT_E, 25),
.freq = CLOCK_CORECLOCK,
.speed = I2C_SPEED_FAST,
.irqn = I2C0_IRQn,
.scl_pcr = (PORT_PCR_MUX(5)),
.sda_pcr = (PORT_PCR_MUX(5)),
},
{
.i2c = I2C1,
.scl_pin = GPIO_PIN(PORT_E, 1),
.sda_pin = GPIO_PIN(PORT_E, 0),
.freq = CLOCK_CORECLOCK,
.speed = I2C_SPEED_FAST,
.irqn = I2C1_IRQn,
.scl_pcr = (PORT_PCR_MUX(6)),
.sda_pcr = (PORT_PCR_MUX(6)),
},
}
@ PORT_E
port E
Definition periph_cpu.h:51
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition periph_cpu.h:279
#define CLOCK_CORECLOCK
CPU Frequency Define.
Definition periph_cpu.h:76

Definition at line 145 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = LPUART0,
.freq = CLOCK_MCGIRCLK,
.pin_rx = GPIO_PIN(PORT_A, 1),
.pin_tx = GPIO_PIN(PORT_A, 2),
.pcr_rx = PORT_PCR_MUX(2),
.pcr_tx = PORT_PCR_MUX(2),
.irqn = LPUART0_IRQn,
.scgc_addr = &SIM->SCGC5,
.scgc_bit = SIM_SCGC5_LPUART0_SHIFT,
.mode = UART_MODE_8N1,
.type = KINETIS_LPUART,
},
}
@ PORT_A
port A
Definition periph_cpu.h:47
@ KINETIS_LPUART
Kinetis Low-power UART (LPUART) module type.
Definition periph_cpu.h:539
@ UART_MODE_8N1
8 data bits, no parity, 1 stop bit
Definition periph_cpu.h:294

Definition at line 96 of file periph_conf.h.