開發平台(Platform): (Ex: Win10, Linux, ...)
8051
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
C51
問題(Question):
請問如何透過call by reference將struct中的pointer member傳給function
例如:
typedef struct _AA
{
unsigned char Addr;
unsigned char bIndex;
unsigned char bLenAddrW;
unsigned char *pDatAddrW;
unsigned char bFlag; //bit0: Notify Busy
//bit1: CmdByte Get
//bit2: Address Write
}_AAA;
unsigned char Dat[10];
void func1(unsigned char*pLenAddrW, unsigned char**ppDatAddrW)
{
*pLenAddrW = aaa;
*ppDatAddrW = Dat;
}
void main(void)
{
_AAA AAA;
_AAA*pAAA = &AAA;
func1(???, ???); //請問要怎麼透過pAAA將struct member的Address傳給func1??
}