HI
I'm studying how to control mouse and keyboard via HID with nRF24LU1+ module referring to firmware of nAN-22.
Even though I set Descriptor as appropriate for mouse and send dates to USB, it has no response. I have no idea why..
To send dates, I used this function : “hal_usb_send_data(uint8_t ep_num, uint8_t* array, uint8_t count)” which is a code of nAN-22. Is it correct function to send packet?
void hal_usb_send_data(uint8_t ep_num, uint8_t* array, uint8_t count)
{
uint8_t i;
uint8_t xdata *buf_ptr;
uint8_t xdata *bc_ptr;
// Calculate the buffer pointer and byte count pointer
buf_ptr = CALCULATE_BUF_IN_PTR(ep_num);
bc_ptr = CALCULATE_BC_IN_PTR(ep_num);
// Copy the data into the USB controller
for( i = 0; i < count; i++ )
{
buf_ptr[i] = array[i];
}
// Set the number of bytes we want to send to USB-host. This also trigger sending of data to USB-host.
*bc_ptr = count;
}
If that function is correct, how much total bytes of data are required for controlling mouse movement and button click? ( Report ID is defined as 1)