[STM32F0:EXTI] Add prelimnary support of exti, common file now in common directory
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
cd9ba87073
commit
1345a3403c
@@ -37,17 +37,12 @@ specific memorymap.h header before including this header file.*/
|
||||
|
||||
#define SYSCFG_PMC MMIO32(SYSCFG_BASE + 0x04)
|
||||
|
||||
/* External interrupt configuration register 1 (SYSCFG_EXTICR1) */
|
||||
#define SYSCFG_EXTICR1 MMIO32(SYSCFG_BASE + 0x08)
|
||||
|
||||
/* External interrupt configuration register 2 (SYSCFG_EXTICR2) */
|
||||
#define SYSCFG_EXTICR2 MMIO32(SYSCFG_BASE + 0x0c)
|
||||
|
||||
/* External interrupt configuration register 3 (SYSCFG_EXTICR3) */
|
||||
#define SYSCFG_EXTICR3 MMIO32(SYSCFG_BASE + 0x10)
|
||||
|
||||
/* External interrupt configuration register 4 (SYSCFG_EXTICR4) */
|
||||
#define SYSCFG_EXTICR4 MMIO32(SYSCFG_BASE + 0x14)
|
||||
/* External interrupt configuration registers [0..3] (SYSCFG_EXTICR[1..4]) */
|
||||
#define SYSCFG_EXTICR(i) MMIO32(SYSCFG_BASE + 0x08 + (i)*4)
|
||||
#define SYSCFG_EXTICR1 SYSCFG_EXTICR(0)
|
||||
#define SYSCFG_EXTICR2 SYSCFG_EXTICR(1)
|
||||
#define SYSCFG_EXTICR3 SYSCFG_EXTICR(2)
|
||||
#define SYSCFG_EXTICR4 SYSCFG_EXTICR(3)
|
||||
|
||||
#define SYSCFG_CMPCR MMIO32(SYSCFG_BASE + 0x20)
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined(STM32F1)
|
||||
#if defined(STM32F0)
|
||||
# include <libopencm3/stm32/f0/exti.h>
|
||||
#elif defined(STM32F1)
|
||||
# include <libopencm3/stm32/f1/exti.h>
|
||||
#elif defined(STM32F2)
|
||||
# include <libopencm3/stm32/f2/exti.h>
|
||||
|
||||
26
include/libopencm3/stm32/f0/exti.h
Normal file
26
include/libopencm3/stm32/f0/exti.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This file is part of the libopencm3 project.
|
||||
*
|
||||
* Copyright (C) 2013 Frantisek Burian <BuFran@seznam.cz>
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBOPENCM3_EXTI_H
|
||||
#define LIBOPENCM3_EXTI_H
|
||||
|
||||
#include <libopencm3/stm32/memorymap.h>
|
||||
#include <libopencm3/stm32/common/exti_common_all.h>
|
||||
|
||||
#endif
|
||||
@@ -665,17 +665,12 @@ If mode specifies output, configuration can be
|
||||
/* AF remap and debug I/O configuration register (AFIO_MAPR) */
|
||||
#define AFIO_MAPR MMIO32(AFIO_BASE + 0x04)
|
||||
|
||||
/* External interrupt configuration register 1 (AFIO_EXTICR1) */
|
||||
#define AFIO_EXTICR1 MMIO32(AFIO_BASE + 0x08)
|
||||
|
||||
/* External interrupt configuration register 2 (AFIO_EXTICR2) */
|
||||
#define AFIO_EXTICR2 MMIO32(AFIO_BASE + 0x0c)
|
||||
|
||||
/* External interrupt configuration register 3 (AFIO_EXTICR3) */
|
||||
#define AFIO_EXTICR3 MMIO32(AFIO_BASE + 0x10)
|
||||
|
||||
/* External interrupt configuration register 4 (AFIO_EXTICR4) */
|
||||
#define AFIO_EXTICR4 MMIO32(AFIO_BASE + 0x14)
|
||||
/* External interrupt configuration register [0..3] (AFIO_EXTICR[1..4])*/
|
||||
#define AFIO_EXTICR(i) MMIO32(AFIO_BASE + 0x08 + (i)*4)
|
||||
#define AFIO_EXTICR1 AFIO_EXTICR(0)
|
||||
#define AFIO_EXTICR2 AFIO_EXTICR(1)
|
||||
#define AFIO_EXTICR3 AFIO_EXTICR(2)
|
||||
#define AFIO_EXTICR4 AFIO_EXTICR(3)
|
||||
|
||||
/* AF remap and debug I/O configuration register (AFIO_MAPR) */
|
||||
#define AFIO_MAPR2 MMIO32(AFIO_BASE + 0x1C)
|
||||
|
||||
Reference in New Issue
Block a user