mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 15:58:36 -07:00
5
applications/external/tama_p1/tama_p1.c
vendored
5
applications/external/tama_p1/tama_p1.c
vendored
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user