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:
parent
d8793bd530
commit
425ad7319b
15
src/gopheros/device/driver.go
Normal file
15
src/gopheros/device/driver.go
Normal 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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user