 68a3f6b4b7
			
		
	
	
		68a3f6b4b7
		
			
		
	
	
	
	
		
			
			* 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>
		
			
				
	
	
		
			30 lines
		
	
	
		
			829 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			829 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <stdbool.h>
 | |
| #include <stdint.h>
 | |
| #include <stddef.h>
 | |
| 
 | |
| /*
 | |
|  * Erase Flash
 | |
|  * Locking operation, uses HSEM to manage shared access.
 | |
|  * @param page, page number
 | |
|  * @param count, page count to erase
 | |
|  */
 | |
| bool api_hal_flash_erase(uint8_t page, uint8_t count);
 | |
| 
 | |
| /*
 | |
|  * Write double word (64 bits)
 | |
|  * Locking operation, uses HSEM to manage shared access.
 | |
|  * @param address - destination address, must be double word aligned.
 | |
|  * @param data - data to write
 | |
|  */
 | |
| bool api_hal_flash_write_dword(size_t address, uint64_t data);
 | |
| 
 | |
| /*
 | |
|  * Write page (4096 bytes or 64 rows of double words).
 | |
|  * Locking operation, uses HSEM to manage shared access.
 | |
|  * @param address - destination address, must be page aligned
 | |
|  * @param source_address - source address
 | |
|  */
 | |
| bool api_hal_flash_write_page(size_t address, size_t source_address);
 |