blob: 6495214f2ba45c24b6ee5b1c43ff305d3f2b59a2 [file] [log] [blame] [edit]
/*
* Copyright 2017, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import <std_connector.camkes>;
import "components/Client/Client.camkes";
import "components/Driver/Driver.camkes";
component Keyboard {
hardware;
emits DataAvailable interrupt;
provides IOPort s;
provides IOPort t; //Pseudo IOPort
}
/* Pseudo hardware device. */
component Dummy {
hardware;
provides IOPort s;
}
assembly {
composition {
component Keyboard keyboard;
component Driver driver;
component Client client;
component Dummy dumb;
connection seL4HardwareIOPort ports(from driver.s, to keyboard.s);
connection seL4HardwareIOPort tports(from driver.t, to keyboard.t);
connection seL4HardwareIOPort cports(from client.s, to dumb.s);
connection seL4HardwareInterrupt irq(from keyboard.interrupt, to driver.interrupt);
connection seL4RPCCall kbd_inf(from client.kbd, to driver.kbd);
connection seL4Notification KeyPressEvent(from driver.keypress, to client.keypress);
}
configuration {
/* The keyboard requires a set of IO ports. This is defined by setting
* the s_attributes attribute to a minimum and maximum accessible IO
* port as below:
*/
keyboard.s_attributes = "0x60:0x64";
/* Pseudo IOPort to demonstrate that the parser can handle multiple ranges
* in either same or different components.
*/
keyboard.t_attributes = "0x1CE:0x1D0";
dumb.s_attributes = "0x123:0x456";
/* The keyboard triggers interrupt 1 when data is available. */
keyboard.interrupt_irq_number = 1;
}
}