70 lines
1.3 KiB
C
70 lines
1.3 KiB
C
/*
|
|
* \file stm32f10x_irq.c
|
|
* \brief
|
|
* Provides an IRQ implementation.
|
|
*
|
|
* Copyright (C) 2016 Houtouridis Christos <houtouridis.ch@gmail.com>
|
|
* All Rights Reserved.
|
|
*
|
|
* NOTICE: All information contained herein is, and remains
|
|
* the property of Houtouridis Christos. The intellectual
|
|
* and technical concepts contained herein are proprietary to
|
|
* Houtouridis Christos and are protected by copyright law.
|
|
* Dissemination of this information or reproduction of this material
|
|
* is strictly forbidden unless prior written permission is obtained
|
|
* from Houtouridis Christos.
|
|
*/
|
|
|
|
#ifndef __stm32f10x_system__h__
|
|
#define __stm32f10x_system__h__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stm32f10x.h>
|
|
#include <stm32f10x_exti.h>
|
|
|
|
|
|
/*!
|
|
* IRQ enumerator
|
|
*/
|
|
typedef enum {
|
|
IRQ0 = 0,
|
|
IRQ1,
|
|
IRQ2,
|
|
IRQ3,
|
|
IRQ4,
|
|
IRQ5,
|
|
IRQ6,
|
|
IRQ7,
|
|
IRQ8,
|
|
IRQ9,
|
|
IRQ10,
|
|
IRQ11,
|
|
IRQ12,
|
|
IRQ13,
|
|
IRQ14,
|
|
IRQ15,
|
|
}IRQ_en;
|
|
|
|
/*!
|
|
* IRQ callback function type
|
|
*/
|
|
typedef void (*irq_callback_ft) (void);
|
|
|
|
extern irq_callback_ft IRQ_Callback[16];
|
|
|
|
|
|
void EXTI9_5_IRQHandler (void);
|
|
|
|
void IRQ_ctl (IRQ_en irq, uint8_t en);
|
|
void IRQ_callback (IRQ_en irq, irq_callback_ft f);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // #ifndef __stm32f10x_system__h__
|
|
|