VMCU_SFR - Milo-D/libvmcu-Virtual-MCU-Library GitHub Wiki
Defined in libvmcu_analyzer.h |
---|
typedef enum { ..., VMCU_SFR_UBRR0H, ... } VMCU_SFR; |
Enumeration of AVR special function registers (SFRs). For example, VMCU_SFR_EECR
= EECR (eeprom control register).
#include "libvmcu_analyzer.h" // VMCU_SFR
int main(const int argc, const char **argv) {
vmcu_model_t *m328p = vmcu_model_ctor(VMCU_DEVICE_M328P);
vmcu_report_t *report = vmcu_analyze_file("file.hex", m328p);
for(uint32_t i = 0; i < report->n_sfr; i++) {
vmcu_sfr_t *sfr = &report->sfr[i];
if(sfr->id == VMCU_TIFR0)
printf("TIFR0 is being used in file.hex\n");
}
vmcu_report_dtor(report);
vmcu_model_dtor(m328p);
return 0;
}
TIFR0 is being used in file.hex
1 The integer value of a single VMCU_SFR
does not have a special meaning
2 VMCU_SFR_NONE
= -1 (no SFR)
3 VMCU_SFR
will be extended once libvmcu is supporting other devices than the ATmega328(P)