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:
Nikolay Minaylov
2022-03-30 18:23:40 +03:00
committed by GitHub
parent 648d8aaa54
commit 2f3ea9494e
93 changed files with 921 additions and 1270 deletions

View File

@@ -71,7 +71,7 @@ bool subghz_tx_rx_worker_rx(SubGhzTxRxWorker* instance, uint8_t* data, uint8_t*
osDelay(1);
}
//waiting for reception to complete
while(hal_gpio_read(&gpio_cc1101_g0)) {
while(furi_hal_gpio_read(&gpio_cc1101_g0)) {
osDelay(1);
if(!--timeout) {
FURI_LOG_W(TAG, "RX cc1101_g0 timeout");
@@ -102,14 +102,14 @@ void subghz_tx_rx_worker_tx(SubGhzTxRxWorker* instance, uint8_t* data, size_t si
furi_hal_subghz_write_packet(data, size);
furi_hal_subghz_tx(); //start send
instance->status = SubGhzTxRxWorkerStatusTx;
while(!hal_gpio_read(&gpio_cc1101_g0)) { // Wait for GDO0 to be set -> sync transmitted
while(!furi_hal_gpio_read(&gpio_cc1101_g0)) { // Wait for GDO0 to be set -> sync transmitted
osDelay(1);
if(!--timeout) {
FURI_LOG_W(TAG, "TX !cc1101_g0 timeout");
break;
}
}
while(hal_gpio_read(&gpio_cc1101_g0)) { // Wait for GDO0 to be cleared -> end of packet
while(furi_hal_gpio_read(&gpio_cc1101_g0)) { // Wait for GDO0 to be cleared -> end of packet
osDelay(1);
if(!--timeout) {
FURI_LOG_W(TAG, "TX cc1101_g0 timeout");
@@ -132,7 +132,7 @@ static int32_t subghz_tx_rx_worker_thread(void* context) {
furi_hal_subghz_idle();
furi_hal_subghz_load_preset(FuriHalSubGhzPresetGFSK9_99KbAsync);
//furi_hal_subghz_load_preset(FuriHalSubGhzPresetMSK99_97KbAsync);
hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
furi_hal_subghz_set_frequency_and_path(instance->frequency);
furi_hal_subghz_flush_rx();