 389ff92cc1
			
		
	
	
		389ff92cc1
		
			
		
	
	
	
	
		
			
			* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
		
			
				
	
	
		
			25 lines
		
	
	
		
			600 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			600 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <furi_hal_ibutton.h>
 | |
| #include <furi_hal_resources.h>
 | |
| 
 | |
| void furi_hal_ibutton_start() {
 | |
|     furi_hal_ibutton_pin_high();
 | |
|     hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
 | |
| }
 | |
| 
 | |
| void furi_hal_ibutton_stop() {
 | |
|     furi_hal_ibutton_pin_high();
 | |
|     hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
 | |
| }
 | |
| 
 | |
| void furi_hal_ibutton_pin_low() {
 | |
|     hal_gpio_write(&ibutton_gpio, false);
 | |
| }
 | |
| 
 | |
| void furi_hal_ibutton_pin_high() {
 | |
|     hal_gpio_write(&ibutton_gpio, true);
 | |
| }
 | |
| 
 | |
| bool furi_hal_ibutton_pin_get_level() {
 | |
|     return hal_gpio_read(&ibutton_gpio);
 | |
| }
 |