Example #1
0
void keyborad_process(u8* buf)
{
	//putchar('k');
	while(EP1BUSY!=0){;}
	
		EP1BUSY = 1;   
			
		Joystick_Send(0,buf);
	
}
Example #2
0
void mouse_process(u8* buf)
{
	// u8 Buffer[8] = { 8, 1, 0, 0, 0, 0, 0};
	while(EP2BUSY!=0){;}
	
		EP2BUSY = 1;   
			
		Joystick_Send(0,buf);
		
		
	
}
Example #3
0
File: main.c Project: LaazV/MBLed
/*******************************************************************************
* Function Name  : main.
* Description    : main routine.
* Input          : None.
* Output         : None.
* Return         : None.
*******************************************************************************/
int main(void)
{
  Set_System();

  USB_Interrupts_Config();

  Set_USBClock();

  USB_Init();
  
  while (1)
  {
    Delay(10000);
    
    if ((JoyState() != 0) & (bDeviceState == CONFIGURED))
    {
      Joystick_Send(JoyState());
    }    
  }
}
Example #4
0
/*******************************************************************************
* Function Name  : main.
* Description    : main routine.
* Input          : None.
* Output         : None.
* Return         : None.
*******************************************************************************/
int main(void)
{
  Set_System();
  
  USB_Interrupts_Config();
  
  Set_USBClock();
  
  USB_Init();

  while (1)
  {
    
    if (bDeviceState == CONFIGURED)
    {
      if ((JoyState() != 0) && (PrevXferComplete))
      {
        Joystick_Send(JoyState());
      }
    }    
  }
}