mirror of
				https://github.com/acidanthera/audk.git
				synced 2025-10-31 19:23:54 +01:00 
			
		
		
		
	IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor
To align the way in MdeModulePkg SerialPortLib and PciSioSerialDxe driver, Divisor is added by one when the reminder is more than half (16 * BaudRate). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
		
							parent
							
								
									9e508f3acc
								
							
						
					
					
						commit
						104bbee55e
					
				| @ -1,7 +1,7 @@ | ||||
| /** @file
 | ||||
|   Serial driver for standard UARTS on an ISA bus. | ||||
| 
 | ||||
| Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> | ||||
| Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> | ||||
| This program and the accompanying materials | ||||
| are licensed and made available under the terms and conditions of the BSD License | ||||
| which accompanies this distribution.  The full text of the license may be found at | ||||
| @ -1397,7 +1397,7 @@ IsaSerialSetAttributes ( | ||||
|                        ((UINT32) BaudRate * 16), | ||||
|                        &Remained | ||||
|                        ); | ||||
|   if (Remained != 0) { | ||||
|   if (Remained >= ((UINT32) BaudRate * 8)) { | ||||
|     Divisor += 1; | ||||
|   } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user