Project

General

Profile

Revision e92b8d00

IDe92b8d0015d1196d785c036bd43bedba09c18f62
Parent 48418a96
Child 606be93c, abbee6ec

Added by Thomas Mullins almost 10 years ago

Changed twi_run() loop to smb_poll() in a loop

View differences:

scout_avr/bom/bootloader.c
64 64
  }
65 65
}
66 66

  
67
static void timer_init(void) {
68
  TCNT0 = 0;
69

  
70
  OCR0A = 200;
71

  
72
  // clear on compare match A
73
  TCCR0A |= _BV(WGM01);
74
  // 1024 prescaler
75
  TCCR0B |= _BV(CS02) | _BV(CS00);
76
}
77

  
67 78
int main() {
68 79
  smb_init(slave_rx);
69 80
  smb_set_address(3); // TODO parameterize address
70
  twi_run();
71
  // TODO timeout
81
  while (1) {
82
    smb_poll();
83
  }
72 84
  return 0;
73 85
}

Also available in: Unified diff