analog/v2-analog-rev1/diag/businterface.c

14 lines
445 B
C
Raw Normal View History

#include <string.h>
#include <hardware/pio.h>
#include "common/config.h"
#include "common/buffers.h"
#include "abus.pio.h"
#include "diag/businterface.h"
2023-01-29 15:50:12 +00:00
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
2023-01-29 15:50:12 +00:00
if((value & (1u << CONFIG_PIN_APPLEBUS_RW-CONFIG_PIN_APPLEBUS_DATA_BASE)) == 0) {
apple_memory[address] = value;
}
}