Guest User

Untitled

a guest
Nov 24th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1.  
  2.     DDRB = 0; //input
  3.     DDRD = 0; //input
  4.     PORTB = 0xFF; //on
  5.     PORTD = 0;    //off
  6.  
  7.  
  8.     for (;;)
  9.     {
  10.         while(fgetc(&USBSerialStream) != 'x');  //wait for x
  11.  
  12.         DDRB = gethex();
  13.         DDRD = gethex();
  14.  
  15.         CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
  16.         USB_USBTask();
  17.     }
  18.  
  19.  
  20.  
  21. /* V1
  22.     DDRB = 0xFF; //output
  23.     DDRD = 0xFF;
  24.     PORTB = 0; //off
  25.     PORTD = 0;
  26.  
  27.  
  28.     for (;;)
  29.     {
  30.         while(fgetc(&USBSerialStream) != 'x');  //wait for x
  31.  
  32.         PORTB = gethex();
  33.         PORTD = gethex();
  34.  
  35.         CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
  36.         USB_USBTask();
  37.     }*/
Add Comment
Please, Sign In to add comment