Announcements
Community Announcement : Welcome to the NEW Cypress Developer Community.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

user_1881301
New Contributor II

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
Expert II

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
Expert II

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

   

 

   

Bob

View solution in original post

0 Likes
user_1881301
New Contributor II

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
user_1881301
New Contributor II

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

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

   

Thanks,

   

Hima

0 Likes