derive some traits on bitflags

This commit is contained in:
Corwin 2023-03-23 22:47:04 +00:00
parent 09ec6c25b0
commit 8eac033650
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -35,6 +35,7 @@ pub(crate) const DISPLAY_STATUS: MemoryMapped<u16> = unsafe { MemoryMapped::new(
const VCOUNT: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x0400_0006) }; const VCOUNT: MemoryMapped<u16> = unsafe { MemoryMapped::new(0x0400_0006) };
bitflags! { bitflags! {
#[derive(PartialEq, Eq, Hash, Debug, Clone, Copy)]
struct GraphicsSettings: u16 { struct GraphicsSettings: u16 {
const PAGE_SELECT = 1 << 0x4; const PAGE_SELECT = 1 << 0x4;
const OAM_HBLANK = 1 << 0x5; const OAM_HBLANK = 1 << 0x5;

View file

@ -40,6 +40,7 @@ impl From<(bool, bool)> for Tri {
bitflags! { bitflags! {
/// Represents a button on the GBA /// Represents a button on the GBA
#[derive(PartialEq, Eq, Hash, Debug, Clone, Copy)]
pub struct Button: u32 { pub struct Button: u32 {
/// The A button /// The A button
const A = 1 << 0; const A = 1 << 0;