SPS_Device uart receive issue

3 posts / 0 new
Last post
prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
SPS_Device uart receive issue

I am using DA1458x_DSPS version 5.150.2
I want to send the received data through UART. In sps_device code uart_rx_callback() is used to receive the data from the uart.

If data is received from Commix via uart ,uart_rx_callback function will call user_periph_push() which writs the data to the buffer. In user_periph_push function i am using user_ble_push to display it in the uart but i am not getting the received value.
static void user_periph_push(uint8_t** wrdata, uint16_t write_amount)
{
bool send_flow_off = false;

//write items to buffer
user_buffer_cfm_write (&periph_to_ble_buffer写_amount);
if (user_buffer_write_check(&periph_to_ble_buffer, wrdata, RX_CALLBACK_SIZE) != RX_CALLBACK_SIZE)
{
ASSERT_WARNING(0);
}
user_ble_push((uint8_t*)wrdata,10);
send_flow_off = user_check_buffer_almost_full(&periph_to_ble_buffer);

if(send_flow_off)
{
uart_sps_flow_off(true);
}
}

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

I suppose that you would like to have somekind of echo of the things that you are typing to the terminal, i am not able to understand what the code that you ve pasted intents to do (what is the purpose of the value 10 in the parameter of the user_ble_push()), but in order to have somekind of echo you can place in the user_ble_push() the following code:

uint8_t *test_p;

Right below the conditional ASSERT_WARNING(0);

test_p = *wrdata;
user_ble_push(--test_p, write_amount);

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

Thank you for your reply.