analog/v2-analog-rev1/diag/businterface.c
2023-01-29 10:50:12 -05:00

14 lines
445 B
C

#include <string.h>
#include <hardware/pio.h>
#include "common/config.h"
#include "common/buffers.h"
#include "abus.pio.h"
#include "diag/businterface.h"
void __time_critical_func(diag_businterface)(uint32_t address, uint32_t value) {
// Shadow parts of the Apple's memory by observing the bus write cycles
if((value & (1u << CONFIG_PIN_APPLEBUS_RW-CONFIG_PIN_APPLEBUS_DATA_BASE)) == 0) {
apple_memory[address] = value;
}
}