+static void choose_isrs(void)
+{
+ if (g.stream_enable_to) {
+ if (g.use_readinc) {
+ attachInterruptVector(IRQ_PORTB, portb_isr_do_to_inc);
+ attachInterruptVector(IRQ_PORTC, portc_isr_nop);
+ }
+ else {
+ attachInterruptVector(IRQ_PORTB, portb_isr_do_to);
+ attachInterruptVector(IRQ_PORTC, portc_isr_frameinc);
+ }
+ }
+ else if (g.stream_enable_from) {
+ g.use_pending = 1;
+ if (g.use_readinc) {
+ attachInterruptVector(IRQ_PORTB,
+ portb_isr_fixed_do_from);
+ attachInterruptVector(IRQ_PORTC, portc_isr_nop);
+ }
+ else {
+ attachInterruptVector(IRQ_PORTB, portb_isr_fixed);
+ attachInterruptVector(IRQ_PORTC,
+ portc_isr_frameinc_do_from);
+ }
+ }
+}
+