Software PDI mode breaks unless the software USART has 100 cycles between bits.
This commit is contained in:
		
							parent
							
								
									7d51e51c79
								
							
						
					
					
						commit
						9a5ae36a4f
					
				
					 8 changed files with 20 additions and 22 deletions
				
			
		| 
						 | 
				
			
			@ -147,7 +147,7 @@ int main(void)
 | 
			
		|||
								 (ReportItem->Attributes.Usage.Usage  == USAGE_SCROLL_WHEEL)       &&
 | 
			
		||||
								 (ReportItem->ItemType                == REPORT_ITEM_TYPE_In))
 | 
			
		||||
						{
 | 
			
		||||
							int16_t WheelDelta = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
 | 
			
		||||
							int16_t WheelDelta = HID_ALIGN_DATA(ReportItem->Value, int16_t);
 | 
			
		||||
							
 | 
			
		||||
							if (WheelDelta)
 | 
			
		||||
							  LEDMask = (LEDS_LED1 | LEDS_LED2 | ((WheelDelta > 0) ? LEDS_LED3 : LEDS_LED4));
 | 
			
		||||
| 
						 | 
				
			
			@ -157,7 +157,7 @@ int main(void)
 | 
			
		|||
								  (ReportItem->Attributes.Usage.Usage == USAGE_Y))                 &&
 | 
			
		||||
								 (ReportItem->ItemType                == REPORT_ITEM_TYPE_In))
 | 
			
		||||
						{
 | 
			
		||||
							int16_t DeltaMovement = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
 | 
			
		||||
							int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem->Value, int16_t);
 | 
			
		||||
							
 | 
			
		||||
							if (ReportItem->Attributes.Usage.Usage == USAGE_X)
 | 
			
		||||
							{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue