avr_raise_irq(p->io.irq + TIMER_IRQ_OUT_PWM1, _timer_get_ocr(p, AVR_TIMER_COMPB));
break;
default:
- printf("%s-%c mode %d UNSUPORTED\n", __FUNCTION__, p->name, p->mode.kind);
+ printf("%s-%c mode %d UNSUPPORTED\n", __FUNCTION__, p->name, p->mode.kind);
avr_timer_reconfigure(p);
break;
}
*
* The slightly more tricky one is the INPUT part. Since the AVR is quite a bit
* slower than your code most likely, there is a way for the AVR UART to tell
- * you to "pause" sending it bytes when it's own input buffer is full.
- * So, the UART will send XON to you when it's fifo is empty, XON means you can
- * send as many bytes as you have until XOFF is send. Note that these are two
+ * you to "pause" sending it bytes when its own input buffer is full.
+ * So, the UART will send XON to you when its fifo is empty, XON means you can
+ * send as many bytes as you have until XOFF is sent. Note that these are two
* IRQs because you /will/ be called with XOFF when sending a byte in INPUT...
* So it's a reentrant process.
*
* volatile int off = 0;
* void irq_xon()
* {
- * off = 0;
- * while (!off && bytes_lefts)
+ * off = 0;
+ * while (!off && bytes_left)
* avr_raise_irq(UART_IRQ_INPUT, a_byte);
* }
* void irq_xoff()
* {
- * off = 1;
+ * off = 1;
* }
*
*/
avr->pending_wait++;
avr->i_shadow = avr->sreg[S_I];
- // run the cycle timers, get the suggested sleeo time
+ // run the cycle timers, get the suggested sleep time
// until the next timer is due
avr_cycle_count_t sleep = avr_cycle_timer_process(avr);
/*
* Internal IRQ system
*
- * This subsystem allow any piece of code to "register" a hook to be called when an IRQ is
+ * This subsystem allows any piece of code to "register" a hook to be called when an IRQ is
* raised. The IRQ definition is up to the module defining it, for example a IOPORT pin change
* might be an IRQ in which case any piece of code can be notified when a pin has changed state
*