[FL-1153] ibutton: add otg pullup support (#415)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		@@ -12,10 +12,12 @@ OneWireMaster::~OneWireMaster() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void OneWireMaster::start(void) {
 | 
					void OneWireMaster::start(void) {
 | 
				
			||||||
    gpio_init(gpio, GpioModeOutputOpenDrain);
 | 
					    gpio_init(gpio, GpioModeOutputOpenDrain);
 | 
				
			||||||
 | 
					    api_hal_power_enable_otg();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void OneWireMaster::stop(void) {
 | 
					void OneWireMaster::stop(void) {
 | 
				
			||||||
    gpio_init(gpio, GpioModeAnalog);
 | 
					    gpio_init(gpio, GpioModeAnalog);
 | 
				
			||||||
 | 
					    api_hal_power_disable_otg();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void OneWireMaster::reset_search() {
 | 
					void OneWireMaster::reset_search() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user