* Add F5 target, lp5562 driver and api-hal-light. Update api-usage, switch to F5 by default. * API HAL: add i2c and hardware version api. Dolphin: show hardware version. * OTP version generator and flashing utility. * Assets script: fix code formatting * Backport F5 changes to F4 * F4: disable insomnia, prevent damage to BLE RX path * F5 HAL API Light: remove magic delay to fix magic BLE * Dolphin: HW target validation on start * invert RSSI indication in sub-1 * API HAL: rename board to body in version api * Gpio tester: detach and release viewport on exit Co-authored-by: aanper <mail@s3f.ru>
		
			
				
	
	
		
			22 lines
		
	
	
		
			470 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			470 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#pragma once
 | 
						|
#include <furi.h>
 | 
						|
#include <api-hal.h>
 | 
						|
#include "one_wire_timings.h"
 | 
						|
 | 
						|
class OneWireMaster {
 | 
						|
private:
 | 
						|
    const GpioPin* gpio;
 | 
						|
 | 
						|
public:
 | 
						|
    OneWireMaster(const GpioPin* one_wire_gpio);
 | 
						|
    ~OneWireMaster();
 | 
						|
    bool reset(void);
 | 
						|
    bool read_bit(void);
 | 
						|
    uint8_t read(void);
 | 
						|
    void read_bytes(uint8_t* buf, uint16_t count);
 | 
						|
    void write_bit(bool value);
 | 
						|
    void write(uint8_t value);
 | 
						|
    void skip(void);
 | 
						|
    void start(void);
 | 
						|
    void stop(void);
 | 
						|
}; |