HI
I used nrf51822- EK board.
BLE HID MOUSE - SDK 8.0
`
How to send left button or right button data?
How to modify below method?
static void mouse_click_send()
{
uint32_t err_code;
uint8_t buffer[3];
if (m_in_boot_mode)
return;
buffer[0] = 0; // Left button (bit 0) pressed
buffer[1] = 1; // Scroll value (-127, 128)
buffer[2] = 1; // Sideways scroll value (-127, 128)
err_code = ble_hids_inp_rep_send(&m_hids,INPUT_REP_BUTTONS_INDEX, INPUT_REP_BUTTONS_LEN, buffer);
if ((err_code != NRF_SUCCESS) &&
(err_code != NRF_ERROR_INVALID_STATE) &&
(err_code != BLE_ERROR_NO_TX_BUFFERS) &&
(err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
)
{
APP_ERROR_CHECK(err_code);
}
}
this code not repeat.
So i want always send Mouse Left button.
case BSP_EVENT_KEY_0:
mouse_click_send();
break;
please, help me