int init_dev()
{
phy_obj = (struct physical_interface*) malloc(sizeof(struct physical_interface));
register_phy_obj(phy_obj);
phy_obj->g_init_phy_layer(); ??????
}
//phy_obj为
struct physical_interface
{
init_phy_layer g_init_phy_layer; //typedef void (*init_phy_layer)();
}
struct physical_interface * phy_obj;
//register_phy_obj为
void register_phy_obj(struct physical_interface * phy_obj)
{
phy_obj->g_init_phy_layer = init_phy_dev;
}
请问“”??????”“那一句什么意思???? |