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/08/03 18:34:49
![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](/uploads/image/z/13510455-15-5.jpg?t=keil%E7%8E%AF%E5%A2%83%E4%B8%8B%2C%E6%8A%A5%E9%94%99%2370%3Aincomplete+type+is+not+allowed%2C%E6%8A%A5%E9%94%99%E5%9C%A8struct+psock+sin%2Csout%3Bstruct+psock%7B++struct+pt+pt%2C+psockpt%3B+%2F%2A+Protothreads+-+one+that%26%2339%3Bs+using+the+psock++++functions%2C+and+one+that+runs+inside+the++++psock+functions.+%2A%2F++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
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];
};
你这样试试