Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate if there is an alternate way to casting to get a handle to the CPU #216

Open
github-actions bot opened this issue Jun 16, 2024 · 0 comments

Comments

@github-actions
Copy link

  • Maybe the data that needs to be accessed can be part of the public interface
  • Maybe we could use the bus itself to access special memory locations to fetch the data
  • Maybe could use a debug CoP that can actually be implemented in HW

Line: 9

/// This is a roundabout way to cast it, since we know the bus master
/// is always the CPU at this point
pub fn cpu_from_bus(bus_peripheral: &mut BusPeripheral) -> &CpuPeripheral {
// TODO: Investigate if there is an alternate way to casting to get a handle to the CPU
// category=Refactoring
// - Maybe the data that needs to be accessed can be part of the public interface
// - Maybe we could use the bus itself to access special memory locations to fetch the data
// - Maybe could use a debug CoP that can actually be implemented in HW
bus_peripheral
.bus_master
.as_any()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants