ADC
用宏定义c++编译器兼容c程序
#ifdef __cplusplus
extern "c"
{
}
枚举类型传值
typedef enum{
CHANNAL_1 = 1;
CHANNAL_2 = 2;
CHANNAL_3 = 3;
}a;
void func(a x){
xxx
}
//调用方法如下
a a1 = CHANNAL_1;
func(a1);
#ifdef __cplusplus
extern "c"
{
}
typedef enum{
CHANNAL_1 = 1;
CHANNAL_2 = 2;
CHANNAL_3 = 3;
}a;
void func(a x){
xxx
}
//调用方法如下
a a1 = CHANNAL_1;
func(a1);