avr->run = avr_callback_run_raw;
avr->sleep = avr_callback_sleep_raw;
avr->state = cpu_Running;
+ avr->log = 1;
avr_reset(avr);
return 0;
}
if (avr->state == cpu_Sleeping) {
if (!avr->sreg[S_I]) {
- if ( avr->log_level) printf("simavr: sleeping with interrupts off, quitting gracefully\n");
+ if (avr->log)
+ printf("simavr: sleeping with interrupts off, quitting gracefully\n");
avr_terminate(avr);
avr->state = cpu_Done;
return;
if (avr->state == cpu_Sleeping) {
if (!avr->sreg[S_I]) {
- if ( avr->log_level) printf("simavr: sleeping with interrupts off, quitting gracefully\n");
+ if (avr->log)
+ printf("simavr: sleeping with interrupts off, quitting gracefully\n");
avr_terminate(avr);
avr->state = cpu_Done;
return;
uint32_t pending[2]; // pending interrupts
// DEBUG ONLY -- value ignored if CONFIG_SIMAVR_TRACE = 0
- int trace;
+ int trace : 1,
+ log : 2; // log level, default to 1
// Only used if CONFIG_SIMAVR_TRACE is defined
struct avr_trace_data_t *trace_data;