From d18d6cd73aeccf52c69994ed99035e421acf10be Mon Sep 17 00:00:00 2001 From: Adrian Zankich Date: Fri, 10 Jul 2015 08:56:39 -0700 Subject: [PATCH] Add missing grove driver alias --- platforms/i2c/grove_drivers.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 platforms/i2c/grove_drivers.go diff --git a/platforms/i2c/grove_drivers.go b/platforms/i2c/grove_drivers.go new file mode 100644 index 00000000..f4f8d6bd --- /dev/null +++ b/platforms/i2c/grove_drivers.go @@ -0,0 +1,26 @@ +package i2c + +import "github.com/hybridgroup/gobot" + +var _ gobot.Driver = (*GroveLcdDriver)(nil) +var _ gobot.Driver = (*GroveAccelerometerDriver)(nil) + +type GroveLcdDriver struct { + *JHD1313M1Driver +} + +type GroveAccelerometerDriver struct { + *MMA7660Driver +} + +func NewGroveLcdDriver(a I2c, name string) *GroveLcdDriver { + return &GroveLcdDriver{ + JHD1313M1Driver: NewJHD1313M1Driver(a, name), + } +} + +func NewGroveAccelerometerDriver(a I2c, name string) *GroveAccelerometerDriver { + return &GroveAccelerometerDriver{ + MMA7660Driver: NewMMA7660Driver(a, name), + } +}