【发布时间】:2014-05-10 18:53:12
【问题描述】:
这是我正在使用的(一些)结构;它们位于.h 文件中:
struct rss_s {
Radio_types device_type; // Its device_type which is defined by the typedef above Radio_Types
char * device_info; // some thing about the radio NAV/COM/etc.
char * device_model; // the Manufactures part/model number.
char * device_serial; // the device's serial number..
int power_48v; // power to the unit..
int power_400hz;
int panel_lamps; // turn off or on the Panel Lamps only
void * radio_info;
};
typedef struct tuner_s { // when we talk about 'sub-radios' we are really saying how many tuners are there??
char * device_name; // OS-name
int frequency[tuned];
int power;
int dial_lamp;
int fd[ ]; // file descriptors
}tuner;
//// 614L8 ::= C614L8
typedef enum Lp_Sw_614L8 { OFF_loop, LEFT, RIGHT, SLEW_LEFT, SLEW_RIGHT } loopsw_614L8;
typedef enum Mo_Sw_614L8 { OFF_614L8, ADF, ANT, LOOP } modesw_614L8;
struct radio_s_614L8 {
loopsw_614L8 loop_sw_614L8;
modesw_614L8 mode_sw_614l8;
int sw_band;
int sw_bfo;
int meter;
tuner * Tuner;
int tuners;
};
现在文件main.c,其中包含所有正常的包括:
// Radio 614L8<br>
static struct radio_s_614L8 radio_614L8 = { { .Tuner = tuner_614L8, .tuners = DIM( tuner_C_614L8 ) } };
static tuner tuner_614L8 = { { .device_name = "/dev/TBD", } };
static struct rss_s radios[] = {
{ C614L8, "ADF", "614L8", "8384", & radio_C_614L8,},};
// now comes the normal main()
我遇到的错误:
【问题讨论】: