1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-15 14:52:45 +01:00
RIOT/boards/qn9080dk/include/periph_conf.h
iosabi ef4b58f4f0 cpu/qn908x: Add timer driver based on CTIMER.
The QN908x CPU has several timer modules: one RTC (Real-Time Clock) that
can count from the 32kHz internal clock or 32.768 kHz external clock,
four CTIMER that use the APB clock and have four channels each and one
SCT timer with up to 10 channels running on the AHB clock.

This patch implements a timer driver for the CTIMER blocks only, which
is enough to make the xtimer module work. Future patches should improve
on this module to support using the RTC CNT2 32-bit free-running
counter unit and/or the SCT timer.
2020-12-04 23:18:27 +01:00

70 lines
1.1 KiB
C

/*
* Copyright (C) 2020 iosabi
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_qn9080dk
* @{
*
* @file
* @brief Configuration of CPU peripherals for QN9080DK base board board
*
* @author iosabi <iosabi@protonmail.com>
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include <stdint.h>
#include "cpu.h"
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name UART configuration
* @{
*/
static const uart_conf_t uart_config[] = {
{
.dev = USART0,
.rx_pin = GPIO_PIN(PORT_A, 17),
.tx_pin = GPIO_PIN(PORT_A, 16),
},
};
#define UART_NUMOF ARRAY_SIZE(uart_config)
/** @} */
/**
* @name Timer configuration
* @{
*/
#define TIMER_NUMOF 4
/** @} */
/* put here the board peripherals definitions:
- Available clocks
- PWMs
- SPIs
- I2C
- ADC
- RTC
- RTT
etc
*/
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
/** @} */