From 53f5251f3d528477325bc17ac9a4e350846ae6ad Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Wed, 3 Jun 2026 15:00:38 -0300 Subject: [PATCH] Update the YMF262-HAL.hpp to add the initial_clear function to clear the YMF262 ic --- Lib/YMF262-HAL/Inc/YMF262-HAL.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/YMF262-HAL/Inc/YMF262-HAL.hpp b/Lib/YMF262-HAL/Inc/YMF262-HAL.hpp index 2fa0fee..df1819c 100644 --- a/Lib/YMF262-HAL/Inc/YMF262-HAL.hpp +++ b/Lib/YMF262-HAL/Inc/YMF262-HAL.hpp @@ -66,6 +66,15 @@ class YMF262_HAL{ write(Bank::BANK_1, 0x105, (mode == OPLMode::OPL3) ? 0x01 : 0x00); }; + void initial_clear(){ + + _gpio.set_ic(State::ACTIVE); + _gpio.delay_ticks(_t_icw_ticks); + _gpio.set_ic(State::INACTIVE); + _gpio.delay_ticks(_t_recovery_ticks); + + }; + }; #endif \ No newline at end of file