Skip to content

Commit

Permalink
fix dma::channel::read_cnt_l reading wrong bit of src_control
Browse files Browse the repository at this point in the history
  • Loading branch information
emrsmsrli committed May 1, 2021
1 parent e216111 commit 40f8f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gba/src/arm/dma_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void channel::write_count(const u8 n, const u8 data) noexcept
u8 channel::read_cnt_l() const noexcept
{
return from_enum<u8>(cnt.dst_control) << 5_u8
| bit::extract(from_enum<u8>(cnt.src_control), 1_u8) << 7_u8;
| bit::extract(from_enum<u8>(cnt.src_control), 0_u8) << 7_u8;
}

u8 channel::read_cnt_h() const noexcept
Expand Down

0 comments on commit 40f8f7c

Please sign in to comment.