Hi, I have the following piece of code:
/////////////
BD_ADDR direccion;
direccion.LAP=0x19C4BB; //24bit LAP (Lower Address Part)
direccion.UAP=0x37; //8bit UAP (Upper Address Part)
direccion.NAP=0x0080;
PORTEMUPortParams pp;
memset (&pp, 0, sizeof(pp));
pp.channel = 0;
pp.device = (BD_ADDR) direccion;
pp.uiportflags = RFCOMM_PORT_FLAGS_REMOTE_DCB;
//////////////////////////
where BD_ADDR is a struct type according to MSDN web:
////
#pragma pack(push, 1)
typedef struct __bd_addr {
union {
struct {
unsigned int LAP : 24;
unsigned int UAP : 8;
};
unsigned int SAP;
};
unsigned short NAP;
} BD_ADDR;
#pragma pack(pop)
////////////
The problem is when I compile the project appears the next error that I dont
understand:
- Error in line """pp.device = (BD_ADDR) direccion;"""
"""error C2679: binary '=' : no operator defined which takes a right-hand
operand of type 'struct _BD_ADDR' (or there is no acceptable conversion)""""
Any suggestion??
Thanks.
Regards, Javier.