int UART<AC>::putchar(int c) { AccessControl<AC> ac_obj; if(is_tx_fifo_full()) { return EOF; } Tx_FIFO_ = static_cast<unsigned int>(0x000000ff & c); return c; }
static int u32_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; if (is_tx_fifo_full(drv_data) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(*(u32 *)(drv_data->tx), reg); drv_data->tx += 4; return 1; }
static int null_writer(struct driver_data *drv_data) { void __iomem *reg = drv_data->ioaddr; u8 n_bytes = drv_data->n_bytes; if (is_tx_fifo_full(drv_data) || (drv_data->tx == drv_data->tx_end)) return 0; write_SSDR(0, reg); drv_data->tx += n_bytes; return 1; }