void avr_flash_init(avr_t * avr, avr_flash_t * p)
{
p->io = _io;
- printf("%s init SPM %04x\n", __FUNCTION__, p->r_spm);
+// printf("%s init SPM %04x\n", __FUNCTION__, p->r_spm);
avr_register_io(avr, &p->io);
avr_register_vector(avr, &p->flash);
{
avr_uart_t * p = (avr_uart_t *)param;
if (avr_regbit_get(avr, p->txen)) {
- // if the interrupts are not used, still raised the UDRE and TXC flaga
+ // if the interrupts are not used, still raised the UDRE and TXC flag
avr_raise_interrupt(avr, &p->udrc);
avr_raise_interrupt(avr, &p->txc);
}
}
-#define AVR_IOCTL_UART_SET_FLAGS(_name) AVR_IOCTL_DEF('u','a','s',(_name))
-#define AVR_IOCTL_UART_GET_FLAGS(_name) AVR_IOCTL_DEF('u','a','g',(_name))
-
static int avr_uart_ioctl(struct avr_io_t * port, uint32_t ctl, void * io_param)
{
avr_uart_t * p = (avr_uart_t *)port;
return res;
}
-
static avr_io_t _io = {
.kind = "uart",
.reset = avr_uart_reset,
* 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
- * IRQs because you /will/ be caused with XOFF when sending a byte in INPUT...
+ * IRQs because you /will/ be called with XOFF when sending a byte in INPUT...
* So it's a reentrant process.
*
* When XOFF has been called, do not send any new bytes, they would be dropped.