48 lines
2.3 KiB
C
48 lines
2.3 KiB
C
|
#ifndef __iox_H
|
|||
|
#define __iox_H
|
|||
|
#include "stm32f10x_gpio.h"
|
|||
|
#include "stm32f10x_it.h"
|
|||
|
#include <stdio.h>
|
|||
|
|
|||
|
/*****************************************
|
|||
|
*<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
****************************************/
|
|||
|
typedef enum
|
|||
|
{
|
|||
|
PA = 0, PB = 1, PC = 2, PD = 3, PE = 4, PF = 5, PG = 6, PSUM = 7
|
|||
|
}PORT_e ; //STM32F103VET6<54><36><EFBFBD>е<EFBFBD>IO<49>˿<EFBFBD>ö<EFBFBD><C3B6>
|
|||
|
|
|||
|
typedef enum
|
|||
|
{
|
|||
|
PIN0 = 0, PIN1 = 1, PIN2 = 2, PIN3 = 3, PIN4 = 4, PIN5 = 5, PIN6 = 6, PIN7 = 7,
|
|||
|
PIN8 = 8, PIN9 = 9, PIN10 = 10, PIN11 = 11, PIN12 = 12, PIN13 = 13, PIN14 = 14, PIN15 = 15, PINSUM = 16
|
|||
|
}PIN_e ; //STM32F103VET6<54><36><EFBFBD>е<EFBFBD>IO<49>˿<EFBFBD><CBBF>µ<EFBFBD>IO<49><4F><EFBFBD><EFBFBD>ö<EFBFBD><C3B6>
|
|||
|
|
|||
|
/*****************************************
|
|||
|
*<EFBFBD>ж<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
****************************************/
|
|||
|
typedef void (*IOFP)(void) ; //<2F><><EFBFBD>庯<EFBFBD><E5BAAF>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|||
|
|
|||
|
/*****************************************
|
|||
|
*<EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
****************************************/
|
|||
|
void Io_Hook(uint32_t extiLine) ; //IO<49>ⲿ<EFBFBD>жϹ<D0B6><CFB9>Ӻ<EFBFBD><D3BA><EFBFBD>
|
|||
|
|
|||
|
/*****************************************
|
|||
|
*<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿں<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
****************************************/
|
|||
|
extern void Gpio_Init(PORT_e ePortx, PIN_e ePinx, GPIOMode_TypeDef gpioMode) ; //GPIO<49><4F>ʼ<EFBFBD><CABC>
|
|||
|
extern void IoExti_Init(PORT_e ePortx, PIN_e ePinx, GPIOMode_TypeDef gpioMode, EXTITrigger_TypeDef exitTrigger, IntPriority_e ePriority) ; //<2F>ⲿ<EFBFBD>жϳ<D0B6>ʼ<EFBFBD><CABC>
|
|||
|
extern void Io_Reverse(PORT_e ePortx, PIN_e ePinx) ; //IO<49><4F>ƽ<EFBFBD><C6BD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>
|
|||
|
extern IOFP Io_RegHookCallback(PIN_e ePinx, IOFP pCallback) ; //IO<49>ⲿ<EFBFBD>жϻص<CFBB><D8B5><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ắ<EFBFBD><E1BAAF>
|
|||
|
extern void EXTI0_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>0<EFBFBD>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
extern void EXTI1_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>1<EFBFBD>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
extern void EXTI2_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>2<EFBFBD>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
extern void EXTI3_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>3<EFBFBD>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
extern void EXTI4_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>4<EFBFBD>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
extern void EXTI15_10_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>10~15<31>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
extern void EXTI9_5_IRQHandler(void) ; //<2F>ⲿ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>5~9<>жϴ<D0B6><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#endif
|
|||
|
|