Fix zerotracker and tamap1 bus issues (#290 #294)

By @xMasterX
This commit is contained in:
Willy-JL
2023-06-16 21:53:22 +01:00
parent a4c0823abd
commit cee49d59b4
2 changed files with 9 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
#include <furi.h>
#include <furi_hal_bus.h>
#include <gui/gui.h>
#include <input/input.h>
#include <storage/storage.h>
@@ -750,6 +751,9 @@ static void tama_p1_init(TamaApp* const ctx) {
if(ctx->rom != NULL) {
// Init TIM2
// 64KHz
furi_hal_bus_enable(FuriHalBusTIM2);
LL_TIM_InitTypeDef tim_init = {
.Prescaler = 999,
.CounterMode = LL_TIM_COUNTERMODE_UP,
@@ -782,6 +786,7 @@ static void tama_p1_deinit(TamaApp* const ctx) {
if(ctx->rom != NULL) {
tamalib_release();
furi_thread_free(ctx->thread);
furi_hal_bus_disable(FuriHalBusTIM2);
free(ctx->rom);
}
}