Commit cc051f11 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Delete more code

parent e5719cc1
......@@ -395,10 +395,6 @@ void io_init(void) {
DDRD = _BV(PORTD1) | _BV(PORTD2) | _BV(PORTD3) | _BV(PORTD4) |
_BV(PORTD5) | _BV(PORTD6) | _BV(PORTD7);
// Run Timer0 (8-bit timer) at F_CPU/1024 -- faster incurs roll arounds.
// Use 16 bit timer?
TCCR0B |= _BV(CS00) | _BV(CS02);
// Assuming f_cpu is 16 MHz, this gives us 31250 baud
UBRR0H = 0;
UBRR0L = 31;
......@@ -424,20 +420,6 @@ void program_change(uint8_t pgm) {
programs[current_program].init();
}
void do_clock_update(void) {
static uint8_t prev_clock = 0;
uint8_t clock = TCNT0;
uint8_t delta = clock - prev_clock;
prev_clock = clock;
if (delta == 0) {
return;
}
pitch_update();
}
void handle_cc(uint8_t cc, uint8_t val) {
if ((cc > 127) || (val > 127)) {
return;
......@@ -455,7 +437,7 @@ int main(void) {
program_change(0);
for (;;) {
do_clock_update();
pitch_update();
uint8_t status, data1, data2;
if (!midi_read(&status, &data1, &data2)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment