Skip to content

Commit

Permalink
Ensure new helper method is used and minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rhargreaves committed Feb 19, 2025
1 parent b19a8d1 commit 0305ba2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/mocks/mock_ym2612.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,16 @@ void _expect_ym2612_write_all_operators_any_data(
u8 chan, u8 baseReg, const char* const file, const int line)
{
for (u8 op = 0; op < 4; op++) {
expect_ym2612_write_operator_any_data(chan, op, baseReg);
_expect_ym2612_write_operator_any_data(chan, op, baseReg, file, line);
}
}

void _expect_ym2612_note_on(u8 chan, const char* const file, const int line)
{
u8 data = 0xF0 + KEY_ON_OFF_CH_INDEX(chan);
_expect_ym2612_write_reg(0, YM_KEY_ON_OFF, data, file, line);
_expect_ym2612_write_reg(0, YM_KEY_ON_OFF, 0xF0 + KEY_ON_OFF_CH_INDEX(chan), file, line);
}

void _expect_ym2612_note_off(u8 chan, const char* const file, const int line)
{
u8 data = KEY_ON_OFF_CH_INDEX(chan);
_expect_ym2612_write_reg(0, YM_KEY_ON_OFF, data, file, line);
_expect_ym2612_write_reg(0, YM_KEY_ON_OFF, KEY_ON_OFF_CH_INDEX(chan), file, line);
}

0 comments on commit 0305ba2

Please sign in to comment.