Skip to main content
zaid shakil
Visitor II
July 26, 2017
Question

USB CDC how to receive values without transmitting

  • July 26, 2017
  • 1 reply
  • 681 views
Posted on July 26, 2017 at 16:09

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    1 reply

    Vangelis Fortounas
    Associate II
    October 3, 2017
    Posted on October 03, 2017 at 16:42

    Hello!

    Just add to your 'while loop' the CDC_Transmit_FS(..); function.

    like this

    /* USER CODE BEGIN 3 */

    DataToSend[0] = 0x11;

    DataToSend[5] = 0x22;

    DataToSend[6] = sensors.gp2y0a60szlf_distance_cm;

    DataToSend[9] = 0x0A;

    CDC_Transmit_FS(DataToSend, 10);

    Note that CDC_Transmit_FS(..) is tweaked and you can't check the result of function if is succeded or busy.

    Regards

    vf