rob1012
Junior Member level 3
return value of pointer
i have a code like this
hal_usb_dev_req_resp_t device_req_cb(hal_usb_device_req* req, uint8_t** data_ptr) reentrant
{
hal_usb_dev_req_resp_t* resp;
hal_usb_hid_device_req_proc(req, &data_ptr, &resp);
return resp;
}
void hal_usb_hid_device_req_proc(hal_usb_device_req* req, uint8_t** data_ptr, hal_usb_dev_req_resp_t* resp)
{
*data_ptr = &string_of_data;
*resp = DATA;
}
this is pass by reference using pointers right? I cant pass the &string_of_data to the device_req_cb. im weirded out already.. please help.
i have a code like this
hal_usb_dev_req_resp_t device_req_cb(hal_usb_device_req* req, uint8_t** data_ptr) reentrant
{
hal_usb_dev_req_resp_t* resp;
hal_usb_hid_device_req_proc(req, &data_ptr, &resp);
return resp;
}
void hal_usb_hid_device_req_proc(hal_usb_device_req* req, uint8_t** data_ptr, hal_usb_dev_req_resp_t* resp)
{
*data_ptr = &string_of_data;
*resp = DATA;
}
this is pass by reference using pointers right? I cant pass the &string_of_data to the device_req_cb. im weirded out already.. please help.