コード例 #1
0
ファイル: io_fip.c プロジェクト: Michael-bochi/training
/* Register the Firmware Image Package driver with the IO abstraction */
int register_io_dev_fip(const io_dev_connector_t **dev_con)
{
	int result;
	assert(dev_con != NULL);

	result = io_register_device(&fip_dev_info);
	if (result == 0)
		*dev_con = &fip_dev_connector;

	return result;
}
コード例 #2
0
ファイル: keyboard.c プロジェクト: ayllon/dalek
/**
 * Install handler
 */
int kb_init(void)
{
    irq_install_handler(KB_IRQ, kb_handler);
    kb_buffer.push_index = kb_buffer.pop_index = 0;

    IODevice* kb = io_register_device("keyboard", "Keyboard", NULL);
    kb->read = kb_read;

    // Attach itself to stdin
    stdin = kb;
    return 0;
}
コード例 #3
0
/* Register the mmc driver with the IO abstraction */
int register_io_dev_mmc(const io_dev_connector_t **dev_con)
{
	int result;

	assert(dev_con != NULL);

	result = io_register_device(&mmc_dev_info);
	if (result == 0) {
		*dev_con = &mmc_dev_connector;
	}

	return result;
}