Split from: How to send data to PC using XMEGA-A3BU Xplained Board

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i tried to send "hello" to pc via usb using asf but i receive nothing

this is the code

#include <asf.h>
  Bool flag_autorize_cdc_transfert = false; //Flag d'autorisation de transfert envoyé par l'hote.

                                       //Caractère reçu
//establishing connection
Bool callback_cdc_enable(void);
Bool callback_cdc_enable(void)
{
    flag_autorize_cdc_transfert = true;
    
    return true;
}
//disable connection
void callback_cdc_disable(void);
void callback_cdc_disable(void)
{
    flag_autorize_cdc_transfert = false;
}
int main (void)
{
    sysclk_init();
    irq_initialize_vectors();
    cpu_irq_enable();
    
    board_init();
    udc_start();
callback_cdc_enable();
    /* Insert application code here, after the board has been initialized. */
    /* This skeleton code simply sets the LED to the state of the button. */
    while (1) {
udi_cdc_write_buf("HELLO",5);
}
}

 

Last Edited: Sun. Jul 26, 2015 - 02:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Shangup.

 

I am deleting your extra posts on the same topic. Do not do it again.

 

Ross

Moderator

 

Ross McKenzie ValuSoft Melbourne Australia