Does anyone know what does "req.dataRetHandler = SetFOO" means in the following code?
Code:
typedef struct
{
unsigned char command;
unsigned int (*dataRetHandler)(unsigned char, unsigned char);
} queue_t;
unsigned char PushInOQ(unsigned char channel, queue_t *pReq )
{
printf("Command = %02X\n",pReq->command);
return 0;
}
unsigned int SetFOO(unsigned char channel, unsigned char uData)
{
queue_t req;
unsigned char result = 0;
req.command = 0x04;
result = PushInOQ( 0, &req);
return (0);
}
void main(void)
{
queue_t req;
unsigned char result = 0;
req.command = 0x01;
req.dataRetHandler = SetFOO;
result = PushInOQ( 0, &req);
}
Thanks in advance.
Regards

