HAL to LL migration: GPIO, HSEM, AES (#1069)
* gpio, hsem, crypto: switch from HAL to LL/registers * Moved GPIO initialization to furi_hal * More HAL removed * All HAL modules disabled * HAL is finally removed * hal_gpio -> furi_hal_gpio, main.h removed * Bootloader build fix * RTOS config moved to freertos-glue * delay -> furi_hal_delay Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ void lp5562_enable(FuriHalI2cBusHandle* handle) {
|
||||
Reg00_Enable reg = {.CHIP_EN = true, .LOG_EN = true};
|
||||
furi_hal_i2c_write_reg_8(handle, LP5562_ADDRESS, 0x00, *(uint8_t*)®, LP5562_I2C_TIMEOUT);
|
||||
//>488μs delay is required after writing to 0x00 register, otherwise program engine will not work
|
||||
delay_us(500);
|
||||
furi_hal_delay_us(500);
|
||||
}
|
||||
|
||||
void lp5562_set_channel_current(FuriHalI2cBusHandle* handle, LP5562Channel channel, uint8_t value) {
|
||||
@@ -121,7 +121,7 @@ void lp5562_execute_program(
|
||||
reg_val &= ~(0x3 << bit_offset);
|
||||
reg_val |= (0x01 << bit_offset); // load
|
||||
furi_hal_i2c_write_reg_8(handle, LP5562_ADDRESS, 0x01, reg_val, LP5562_I2C_TIMEOUT);
|
||||
delay_us(100);
|
||||
furi_hal_delay_us(100);
|
||||
|
||||
// Program load
|
||||
for(uint8_t i = 0; i < 16; i++) {
|
||||
|
Reference in New Issue
Block a user