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:
		| @@ -3,13 +3,13 @@ | ||||
| #include <furi_hal.h> | ||||
|  | ||||
| void DecoderGpioOut::process_front(bool polarity, uint32_t time) { | ||||
|     hal_gpio_write(&gpio_ext_pa7, polarity); | ||||
|     furi_hal_gpio_write(&gpio_ext_pa7, polarity); | ||||
| } | ||||
|  | ||||
| DecoderGpioOut::DecoderGpioOut() { | ||||
|     hal_gpio_init_simple(&gpio_ext_pa7, GpioModeOutputPushPull); | ||||
|     furi_hal_gpio_init_simple(&gpio_ext_pa7, GpioModeOutputPushPull); | ||||
| } | ||||
|  | ||||
| DecoderGpioOut::~DecoderGpioOut() { | ||||
|     hal_gpio_init_simple(&gpio_ext_pa7, GpioModeAnalog); | ||||
|     furi_hal_gpio_init_simple(&gpio_ext_pa7, GpioModeAnalog); | ||||
| } | ||||
|   | ||||
| @@ -48,15 +48,15 @@ void RfidWriter::stop() { | ||||
|  | ||||
| void RfidWriter::write_gap(uint32_t gap_time) { | ||||
|     furi_hal_rfid_tim_read_stop(); | ||||
|     delay_us(gap_time * 8); | ||||
|     furi_hal_delay_us(gap_time * 8); | ||||
|     furi_hal_rfid_tim_read_start(); | ||||
| } | ||||
|  | ||||
| void RfidWriter::write_bit(bool value) { | ||||
|     if(value) { | ||||
|         delay_us(T55xxTiming::data_1 * 8); | ||||
|         furi_hal_delay_us(T55xxTiming::data_1 * 8); | ||||
|     } else { | ||||
|         delay_us(T55xxTiming::data_0 * 8); | ||||
|         furi_hal_delay_us(T55xxTiming::data_0 * 8); | ||||
|     } | ||||
|     write_gap(T55xxTiming::write_gap); | ||||
| } | ||||
| @@ -68,7 +68,7 @@ void RfidWriter::write_byte(uint8_t value) { | ||||
| } | ||||
|  | ||||
| void RfidWriter::write_block(uint8_t page, uint8_t block, bool lock_bit, uint32_t data) { | ||||
|     delay_us(T55xxTiming::wait_time * 8); | ||||
|     furi_hal_delay_us(T55xxTiming::wait_time * 8); | ||||
|  | ||||
|     // start gap | ||||
|     write_gap(T55xxTiming::start_gap); | ||||
| @@ -101,9 +101,9 @@ void RfidWriter::write_block(uint8_t page, uint8_t block, bool lock_bit, uint32_ | ||||
|     write_bit((block >> 1) & 1); | ||||
|     write_bit((block >> 0) & 1); | ||||
|  | ||||
|     delay_us(T55xxTiming::program * 8); | ||||
|     furi_hal_delay_us(T55xxTiming::program * 8); | ||||
|  | ||||
|     delay_us(T55xxTiming::wait_time * 8); | ||||
|     furi_hal_delay_us(T55xxTiming::wait_time * 8); | ||||
|     write_reset(); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user