[FL-1190] Enable OTG pullup for reading and writing keys (#423)
This commit is contained in:
		| @@ -178,10 +178,12 @@ void KeyReader::switch_mode_if_needed() { | ||||
| } | ||||
|  | ||||
| void KeyReader::start() { | ||||
|     api_hal_power_enable_otg(); | ||||
|     switch_to(ReadMode::CYFRAL_METAKOM); | ||||
| } | ||||
|  | ||||
| void KeyReader::stop() { | ||||
|     api_hal_power_disable_otg(); | ||||
|     onewire_master->stop(); | ||||
|     stop_comaparator(); | ||||
| } | ||||
|   | ||||
| @@ -10,10 +10,12 @@ KeyWriter::Error KeyWriter::write(iButtonKey* key) { | ||||
| } | ||||
|  | ||||
| void KeyWriter::start() { | ||||
|     api_hal_power_enable_otg(); | ||||
|     onewire_master->start(); | ||||
| } | ||||
|  | ||||
| void KeyWriter::stop() { | ||||
|     api_hal_power_disable_otg(); | ||||
|     onewire_master->stop(); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user