typedef enum IRQn
{
a=1,
b=5,
}IRQn_Type
//这里的IRQn里的量相当于宏定义
void fun(IRQn_Type)
//在以IRQn_Type为参数的函数中,实际参数只能是a或者b,其余的出错。
typedef enum IRQn
{
a=1,
b=5,
}IRQn_Type
//这里的IRQn里的量相当于宏定义
void fun(IRQn_Type)
//在以IRQn_Type为参数的函数中,实际参数只能是a或者b,其余的出错。
转载于:https://www.cnblogs.com/johnsblog/archive/2013/05/08/3066338.html