libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
exti_common_all.h
Go to the documentation of this file.
1/** @addtogroup exti_defines
2 *
3 * @author @htmlonly © @endhtmlonly 2010
4 * Mark Butler <mbutler@physics.otago.ac.nz>
5 */
6/*
7 * This file is part of the libopencm3 project.
8 *
9 * Copyright (C) 2010 Mark Butler <mbutler@physics.otago.ac.nz>
10 *
11 * This library is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this library. If not, see <http://www.gnu.org/licenses/>.
23 */
24
25/** @cond */
26#if defined(LIBOPENCM3_EXTI_H)
27/** @endcond */
28#ifndef LIBOPENCM3_EXTI_COMMON_ALL_H
29#define LIBOPENCM3_EXTI_COMMON_ALL_H
30/**@{*/
31
32/* EXTI number definitions */
33#define EXTI0 (1 << 0)
34#define EXTI1 (1 << 1)
35#define EXTI2 (1 << 2)
36#define EXTI3 (1 << 3)
37#define EXTI4 (1 << 4)
38#define EXTI5 (1 << 5)
39#define EXTI6 (1 << 6)
40#define EXTI7 (1 << 7)
41#define EXTI8 (1 << 8)
42#define EXTI9 (1 << 9)
43#define EXTI10 (1 << 10)
44#define EXTI11 (1 << 11)
45#define EXTI12 (1 << 12)
46#define EXTI13 (1 << 13)
47#define EXTI14 (1 << 14)
48#define EXTI15 (1 << 15)
49#define EXTI16 (1 << 16)
50#define EXTI17 (1 << 17)
51#define EXTI18 (1 << 18)
52#define EXTI19 (1 << 19)
53#define EXTI20 (1 << 20)
54#define EXTI21 (1 << 21)
55#define EXTI22 (1 << 22)
56#define EXTI23 (1 << 23)
57#define EXTI24 (1 << 24)
58#define EXTI25 (1 << 25)
59#define EXTI26 (1 << 26)
60#define EXTI27 (1 << 27)
61#define EXTI28 (1 << 28)
62#define EXTI29 (1 << 29)
63#define EXTI30 (1 << 30)
64#define EXTI31 (1 << 31)
65
66#define EXTI32 (1 << 0)
67#define EXTI33 (1 << 1)
68#define EXTI34 (1 << 2)
69#define EXTI35 (1 << 3)
70#define EXTI36 (1 << 4)
71#define EXTI37 (1 << 5)
72
73/* Trigger types */
78};
79
81
82void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig);
83void exti_enable_request(uint32_t extis);
84void exti_disable_request(uint32_t extis);
85void exti_reset_request(uint32_t extis);
86void exti_select_source(uint32_t exti, uint32_t gpioport);
87uint32_t exti_get_flag_status(uint32_t exti);
88
90/**@}*/
91
92#endif
93/** @cond */
94#else
95#warning "exti_common_all.h should not be included directly, only via exti.h"
96#endif
97/** @endcond */
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33
void exti_disable_request(uint32_t extis)
exti_trigger_type
uint32_t exti_get_flag_status(uint32_t exti)
void exti_select_source(uint32_t exti, uint32_t gpioport)
void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig)
void exti_reset_request(uint32_t extis)
void exti_enable_request(uint32_t extis)
@ EXTI_TRIGGER_RISING
@ EXTI_TRIGGER_FALLING
@ EXTI_TRIGGER_BOTH