[問題] typedef struct
#include <stdio.h>
#include <stdlib.h>
#define Uint8 unsigned char
#define Uint16 unsigned short
typedef struct {
Uint8 GO_OUT;
Uint8 GIO_OUT;
Uint8 GIO_DIR;
Uint8 GIO_IN;
Uint8 GIO_FUNC;
Uint8 GIO_RISE_INT_EN;
Uint8 GIO_FALL_INT_EN;
Uint8 GIO_RISE_INT_FLG;
}CSL_RtcGpioRegs;
typedef CSL_RtcGpioRegs *CSL_RtcGpioRegsOvly;
typedef struct {
CSL_RtcGpioRegsOvly rtcreg;
}CSL_RtcGpioObj;
typedef CSL_RtcGpioObj *CSL_RtcGpioHandle; ///< Module Handle
int main(int argc, char *argv[])
{
CSL_RtcGpioHandle hndle;
hndle->rtcreg->GIO_IN=11;
printf("hndle->rtcreg->GIO_OUT=%d\n",hndle->rtcreg->GIO_IN);
system("PAUSE");
return 0;
}
請問要如何指定GIO_IN給這個變數值呢?小弟RUN出來會出錯>"<
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.166.182
→
03/07 11:14, , 1F
03/07 11:14, 1F
→
03/07 11:16, , 2F
03/07 11:16, 2F
→
03/07 11:19, , 3F
03/07 11:19, 3F
→
03/07 11:19, , 4F
03/07 11:19, 4F
→
03/07 11:20, , 5F
03/07 11:20, 5F
→
03/07 11:21, , 6F
03/07 11:21, 6F
→
03/07 11:21, , 7F
03/07 11:21, 7F
→
03/07 11:21, , 8F
03/07 11:21, 8F
→
03/07 11:21, , 9F
03/07 11:21, 9F
→
03/07 11:22, , 10F
03/07 11:22, 10F
→
03/07 11:23, , 11F
03/07 11:23, 11F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章