Skip to content

Commit

Permalink
stm32: exti: Define all irqs in common header.
Browse files Browse the repository at this point in the history
There's more exti lines on many more devices now. F0 and F3 have extras, as did
L1 and L0.  There's no real reason not to have higher order EXTI definitions
defined at the top level, and it reduces the number of files to merge together
to find all definitions for the bigger devices.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>

Fixes #338
  • Loading branch information
karlp committed Sep 30, 2014
1 parent 283d8cc commit 2211944
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 48 deletions.
19 changes: 19 additions & 0 deletions include/libopencm3/stm32/common/exti_common_all.h
Expand Up @@ -59,6 +59,25 @@
#define EXTI17 (1 << 17)
#define EXTI18 (1 << 18)
#define EXTI19 (1 << 19)
#define EXTI20 (1 << 20)
#define EXTI21 (1 << 21)
#define EXTI22 (1 << 22)
#define EXTI23 (1 << 23)
#define EXTI24 (1 << 24)
#define EXTI25 (1 << 25)
#define EXTI26 (1 << 26)
#define EXTI27 (1 << 27)
#define EXTI28 (1 << 28)
#define EXTI29 (1 << 29)
#define EXTI30 (1 << 30)
#define EXTI31 (1 << 31)

#define EXTI32 (1 << 0)
#define EXTI33 (1 << 1)
#define EXTI34 (1 << 2)
#define EXTI35 (1 << 3)
#define EXTI36 (1 << 4)
#define EXTI37 (1 << 5)

/* Trigger types */
enum exti_trigger_type {
Expand Down
45 changes: 0 additions & 45 deletions include/libopencm3/stm32/common/exti_common_l1f24.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/libopencm3/stm32/f2/exti.h
Expand Up @@ -36,6 +36,6 @@
#ifndef LIBOPENCM3_EXTI_H
#define LIBOPENCM3_EXTI_H

#include <libopencm3/stm32/common/exti_common_l1f24.h>
#include <libopencm3/stm32/common/exti_common_all.h>

#endif
2 changes: 1 addition & 1 deletion include/libopencm3/stm32/f4/exti.h
Expand Up @@ -36,6 +36,6 @@
#ifndef LIBOPENCM3_EXTI_H
#define LIBOPENCM3_EXTI_H

#include <libopencm3/stm32/common/exti_common_l1f24.h>
#include <libopencm3/stm32/common/exti_common_all.h>

#endif
2 changes: 1 addition & 1 deletion include/libopencm3/stm32/l1/exti.h
Expand Up @@ -36,6 +36,6 @@
#ifndef LIBOPENCM3_EXTI_H
#define LIBOPENCM3_EXTI_H

#include <libopencm3/stm32/common/exti_common_l1f24.h>
#include <libopencm3/stm32/common/exti_common_all.h>

#endif

0 comments on commit 2211944

Please sign in to comment.