1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

Define driver interface

This interface must be implemented by all device drivers in the driver
sub-packages.
This commit is contained in:
Achilleas Anagnostopoulos 2017-07-05 19:36:08 +01:00
parent d8793bd530
commit 425ad7319b

View File

@ -0,0 +1,15 @@
package device
import "gopheros/kernel"
// Driver is an interface implemented by all drivers.
type Driver interface {
// DriverName returns the name of the driver.
DriverName() string
// DriverVersion returns the driver version.
DriverVersion() (major uint16, minor uint16, patch uint16)
// DriverInit initializes the device driver.
DriverInit() *kernel.Error
}