keil环境下,报错#70:incomplete type is not allowed,报错在struct psock sin,sout;struct psock{ struct pt pt, psockpt; /* Protothreads - one that's using the psock functions, and one that runs inside the psock functions. */ const u8_t

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 05:45:48
keil环境下,报错#70:incompletetypeisnotallowed,报错在structpsocksin,sout;structpsock{structptpt,psockpt;/*Pro

keil环境下,报错#70:incomplete type is not allowed,报错在struct psock sin,sout;struct psock{ struct pt pt, psockpt; /* Protothreads - one that's using the psock functions, and one that runs inside the psock functions. */ const u8_t
keil环境下,报错#70:incomplete type is not allowed,报错在struct psock sin,sout;

struct psock{
  struct pt pt, psockpt; /* Protothreads - one that's using the psock
    functions, and one that runs inside the
    psock functions. */
  const u8_t *sendptr;   /* Pointer to the next data to be sent. */
  u8_t *readptr;         /* Pointer to the next data to be read. */
  char *bufptr;          /* Pointer to the buffer used for buffering
    incoming data. */
  u16_t sendlen;         /* The number of bytes left to be sent. */
  u16_t readlen;         /* The number of bytes left to be read. */
  struct psock_buf buf;  /* The structure holding the state of the
    input buffer. */
  unsigned int bufsize;  /* The size of the input buffer. */
  unsigned char state;   /* The state of the protosocket. */
};




已经定义了psock啊,怎么老是提示有错啊,难道要typedef,但是pt也是个结构体却没有typedef啊,我就觉得奇怪了,被这个问题困扰很久了

keil环境下,报错#70:incomplete type is not allowed,报错在struct psock sin,sout;struct psock{ struct pt pt, psockpt; /* Protothreads - one that's using the psock functions, and one that runs inside the psock functions. */ const u8_t
struct psock{
.
}Psock;
struct can_state {
unsigned char timer;
Psock sin,sout;
pt outputpt;
char state;
char inputbuffer[16];
};
你这样试试