0

这是示例代码:

typedef struct
{
  char symname[DLL_MAX_SYMNAME_LEN]; // Symbol name char
  filename[DLL_MAX_FILENAME_LEN]; // File name from which the
                                  // symbol comes
  unsigned int vaddr; // Exact address of nearest symbol
} dll_sym_info_t;

extern void sbblink_write_one_frame(u8 In,u8 F,u8 Ph,u8 Sub,u8 Ch,u8 S,u8 T, u8 P);

const char * str_sbblink_write_OP_frame_channels = "sbblink_write_one_frame";
void (*fun_sbblink_write_OP_frame_channels) (u8 In,u8 Fpga,u8 InSlot,u8 SubCh,u8 Chan,u8 Size,u8 Type,u8 Print);
.
.
fun_sbblink_write_OP_frame_channels = (void (*) (u8,u8,u8,u8,u8,u8,u8,u8))sym.vaddr;
.
.
fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0);

但即使是错误:

error: too few arguments to function 'fun_sbblink_write_OP_frame_channels'

请帮我解决一下这个。

谢谢,

4

1 回答 1

0

尽量保持简单。如果“复杂”问题失败,请尝试更简单的方法,即

/* Since this doesn't work, let's try something that really should work
   fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0); */

sbblink_write_one_frame(1,2,3,4,5,6,7,8);

然后,如果可行,请尝试:

/* Since this doesn't work, let's try something that really should work
   fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0); */

/* OK, this worked, let's go one step forward
sbblink_write_one_frame(1,2,3,4,5,6,7,8); */
fun_sbblink_write_OP_frame_channels (1,2,3,4,5,6,7,8);

然后尝试:

/* OK, this silly stuff worked, let's go all the way
sbblink_write_one_frame(1,2,3,4,5,6,7,8);
fun_sbblink_write_OP_frame_channels (1,2,3,4,5,6,7,8); */
fun_sbblink_write_OP_frame_channels (0,SBBL_FLINK,PhSlotRRH,i,0,0,0,0);

您在每次尝试中获得的错误/成功应该会帮助您解决问题。

于 2013-06-27T15:11:27.337 回答