Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 Marian Buschsieweke
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef PERIPH_CONF_H
21#define PERIPH_CONF_H
22
23#include "cpu.h"
24#include "periph_cpu.h"
25
26#include "cfg_clk_default.h"
27#include "cfg_timer_default.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
37static const uart_conf_t uart_config[] = {
38 {
40 .rx_pin = GPIO_PIN(PORT_A, 0),
41 .tx_pin = GPIO_PIN(PORT_A, 1),
42#ifdef MODULE_PERIPH_UART_HW_FC
43 .cts_pin = GPIO_UNDEF,
44 .rts_pin = GPIO_UNDEF
45#endif
46 }
47};
48
49#define UART_0_ISR isr_uart0
51#define UART_NUMOF ARRAY_SIZE(uart_config)
59#define I2C_IRQ_PRIO 1
60
61static const i2c_conf_t i2c_config[] = {
62 {
64 .scl_pin = GPIO_PIN(PORT_A, 2),
65 .sda_pin = GPIO_PIN(PORT_A, 4)
66 },
67};
68
69#define I2C_NUMOF ARRAY_SIZE(i2c_config)
76static const spi_conf_t spi_config[] = {
77 {
78 .num = 0,
79 .mosi_pin = GPIO_PIN(PORT_A, 4),
80 .miso_pin = GPIO_PIN(PORT_A, 5),
81 .sck_pin = GPIO_PIN(PORT_A, 2),
82 .cs_pin = GPIO_PIN(PORT_D, 0)
83 }
84};
85
86#define SPI_NUMOF ARRAY_SIZE(spi_config)
93#define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
94
95static const adc_conf_t adc_config[] = {
96 GPIO_PIN(PORT_A, 6),
97};
98
99#define ADC_NUMOF ARRAY_SIZE(adc_config)
102#ifdef __cplusplus
103} /* end extern "C" */
104#endif
105
106#endif /* PERIPH_CONF_H */
@ PORT_A
port A
Definition periph_cpu.h:47
@ PORT_D
port D
Definition periph_cpu.h:50
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition periph_cpu.h:279
Default clock configuration for cc2538 based boards.
#define UART0_BASEADDR
UART0 Instance.
ADC device configuration.
Definition periph_cpu.h:379
I2C configuration structure.
Definition periph_cpu.h:299
i2c_speed_t speed
Configured bus speed, actual speed may be lower but never higher.
Definition periph_cpu.h:304
SPI device configuration.
Definition periph_cpu.h:337
uint8_t num
number of SSI device, i.e.
Definition periph_cpu.h:296
UART device configuration.
Definition periph_cpu.h:218
USART_t * dev
pointer to the used UART device
Definition periph_cpu.h:219