CYBLE-222005-00 BLE_HID_Keyboard example with UART receive

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_1881301
Level 2
Level 2
First like received

in the example the keystrokes send over HID is simulated: SimulateKeyboard();

   

I should like to receive keystrokes on the uart-RX  line and send them over HID.

   

How can I check the UART RX buffer and read the incomming chars ?

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Go through the UART datasheet and look for the APIs GetRxBufferSize() and GetData().

   

 

   

Bob

View solution in original post

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Go through the UART datasheet and look for the APIs GetRxBufferSize() and GetData().

   

 

   

Bob

0 Likes
user_1881301
Level 2
Level 2
First like received

thank you Bob, I'm know able to get characters from the RX buffer and transmit them as HID key-press/release.

   

Where can I find the value of the connection and advertising interval setup in the project ?

0 Likes

when running in PSoC debugger all is running - GAP connecting, reading from RX buffer and sending as HID keypresses and going to CySysPmDeepSleep();

   

When leaving debug (shift+F5) - UART RX stops working. 

   

Checking before going to deepsleep seams not good enough:

   

if(((UART_DEB_SpiUartGetTxBufferSize() + UART_DEB_GET_TX_FIFO_SR_VALID) == 0u) &&

   

((UART_DEB_SpiUartGetRxBufferSize() + UART_DEB_GET_RX_FIFO_SR_VALID) == 0u))

   

{

   

CySysPmDeepSleep();

   

}

   

A hint pls.

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Please have a look at the BLE component configuration Window 'GAP Settings' tab.

   

Thanks,

   

Hima

0 Likes