From 553e986a380b9ed1cb81253c644ac42ed3ec17b2 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 10 Nov 2023 17:36:06 +0000 Subject: [PATCH] Update 64drive_ll.c (#63) ## Description Changes the names of some defines related to hardware variants. ## Motivation and Context Some of the defines are specific and may cause issues when adding other flashcarts. ## How Has This Been Tested? ## Screenshots ## Types of changes - [x] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. Signed-off-by: GITHUB_USER --- src/flashcart/64drive/64drive_ll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flashcart/64drive/64drive_ll.c b/src/flashcart/64drive/64drive_ll.c index fb00a89c..d0a02ce0 100644 --- a/src/flashcart/64drive/64drive_ll.c +++ b/src/flashcart/64drive/64drive_ll.c @@ -6,8 +6,8 @@ #define CI_STATUS_BUSY (1 << 12) -#define DEVICE_VARIANT_MASK (0xFFFF) -#define FPGA_REVISION_MASK (0xFFFF) +#define D64_DEVICE_VARIANT_MASK (0xFFFF) +#define D64_FPGA_REVISION_MASK (0xFFFF) typedef enum { @@ -46,8 +46,8 @@ bool d64_ll_get_version (d64_device_variant_t *device_variant, uint16_t *fpga_re if (d64_ll_ci_wait()) { return true; } - *device_variant = (d64_device_variant_t) (io_read((uint32_t) (&d64_regs->VARIANT)) & DEVICE_VARIANT_MASK); - *fpga_revision = (io_read((uint32_t) (&d64_regs->REVISION)) & FPGA_REVISION_MASK); + *device_variant = (d64_device_variant_t) (io_read((uint32_t) (&d64_regs->VARIANT)) & D64_DEVICE_VARIANT_MASK); + *fpga_revision = (io_read((uint32_t) (&d64_regs->REVISION)) & D64_FPGA_REVISION_MASK); *bootloader_version = io_read((uint32_t) (&d64_regs->PERSISTENT)); return d64_ll_ci_wait(); }