Also fix use of weak stm32 internal pullup
This commit is contained in:
		
							parent
							
								
									df33618b26
								
							
						
					
					
						commit
						b13162f7fd
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -51,8 +51,8 @@ void i2c_init(void)
 | 
			
		|||
 | 
			
		||||
  chThdSleepMilliseconds(10);
 | 
			
		||||
 
 | 
			
		||||
  palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
 | 
			
		||||
  palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
 | 
			
		||||
  palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
 | 
			
		||||
  palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
 | 
			
		||||
 | 
			
		||||
  //i2cInit(); //This is invoked by halInit() so no need to redo it.
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue