Update 64drive_ll.c (#63)

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Changes the names of some defines related to hardware variants.

## Motivation and Context
<!--- What does this sample do? What problem does it solve? -->
<!--- If it fixes/closes/resolves an open issue, please link to the
issue here -->
Some of the defines are specific and may cause issues when adding other
flashcarts.

## How Has This Been Tested?
<!-- (if applicable) -->
<!--- Please describe in detail how you tested your sample/changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots
<!-- (if appropriate): -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [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:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [ ] 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.

<!--- It would be nice if you could sign off your contribution by
replacing the name with your GitHub user name and GitHub email contact.
-->
Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>
This commit is contained in:
Robin Jones 2023-11-10 17:36:06 +00:00 committed by GitHub
parent 3e7c4cec42
commit 553e986a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,8 @@
#define CI_STATUS_BUSY (1 << 12) #define CI_STATUS_BUSY (1 << 12)
#define DEVICE_VARIANT_MASK (0xFFFF) #define D64_DEVICE_VARIANT_MASK (0xFFFF)
#define FPGA_REVISION_MASK (0xFFFF) #define D64_FPGA_REVISION_MASK (0xFFFF)
typedef enum { 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()) { if (d64_ll_ci_wait()) {
return true; return true;
} }
*device_variant = (d64_device_variant_t) (io_read((uint32_t) (&d64_regs->VARIANT)) & DEVICE_VARIANT_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)) & FPGA_REVISION_MASK); *fpga_revision = (io_read((uint32_t) (&d64_regs->REVISION)) & D64_FPGA_REVISION_MASK);
*bootloader_version = io_read((uint32_t) (&d64_regs->PERSISTENT)); *bootloader_version = io_read((uint32_t) (&d64_regs->PERSISTENT));
return d64_ll_ci_wait(); return d64_ll_ci_wait();
} }