gate.c 234 Bytes
Newer Older
Jacob Vosmaer's avatar
Jacob Vosmaer committed
1 2 3 4 5
#include <avr/io.h>
#include "voice.h"
#include "gate.h"

void
Jacob Vosmaer's avatar
Jacob Vosmaer committed
6
gate_on_legato(uint8_t v)
Jacob Vosmaer's avatar
Jacob Vosmaer committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
{
	if (v > NUM_VOICES) {
		return;
	}

	PORTC |= _BV(v);
}

void
gate_off(uint8_t v)
{
	if (v > NUM_VOICES) {
		return;
	}

	PORTC &= ~_BV(v);
}