[Style] Do not define types if not necessary.
This commit is contained in:
parent
7085867db6
commit
b6231dbb49
@ -58,15 +58,15 @@
|
|||||||
#define EXTI19 (1 << 19)
|
#define EXTI19 (1 << 19)
|
||||||
|
|
||||||
/* Trigger types */
|
/* Trigger types */
|
||||||
typedef enum trigger_e {
|
enum exti_trigger_type {
|
||||||
EXTI_TRIGGER_RISING,
|
EXTI_TRIGGER_RISING,
|
||||||
EXTI_TRIGGER_FALLING,
|
EXTI_TRIGGER_FALLING,
|
||||||
EXTI_TRIGGER_BOTH,
|
EXTI_TRIGGER_BOTH,
|
||||||
} exti_trigger_type;
|
};
|
||||||
|
|
||||||
BEGIN_DECLS
|
BEGIN_DECLS
|
||||||
|
|
||||||
void exti_set_trigger(uint32_t extis, exti_trigger_type trig);
|
void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig);
|
||||||
void exti_enable_request(uint32_t extis);
|
void exti_enable_request(uint32_t extis);
|
||||||
void exti_disable_request(uint32_t extis);
|
void exti_disable_request(uint32_t extis);
|
||||||
void exti_reset_request(uint32_t extis);
|
void exti_reset_request(uint32_t extis);
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <libopencm3/stm32/gpio.h>
|
#include <libopencm3/stm32/gpio.h>
|
||||||
|
|
||||||
void exti_set_trigger(uint32_t extis, exti_trigger_type trig)
|
void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig)
|
||||||
{
|
{
|
||||||
switch (trig) {
|
switch (trig) {
|
||||||
case EXTI_TRIGGER_RISING:
|
case EXTI_TRIGGER_RISING:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user