forked from hybridgroup/cylon-i2c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (31 loc) · 953 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"use strict";
var Drivers = {
blinkm: require("./lib/blinkm"),
hmc6352: require("./lib/hmc6352"),
mpl115a2: require("./lib/mpl115a2"),
bmp180: require("./lib/bmp180"),
jhd1313m1: require("./lib/jhd1313m1"),
mpu6050: require("./lib/mpu6050"),
lcd: require("./lib/lcd"),
lsm9ds0g: require("./lib/lsm9ds0g"),
lsm9ds0xm: require("./lib/lsm9ds0xm"),
"lidar-lite": require("./lib/lidar-lite"),
pca9685: require("./lib/pca9685"),
pca9544a: require("./lib/pca9544a"),
mag3110: require("./lib/mag3110"),
hmc5883l: require("./lib/hmc5883l"),
mma7660: require("./lib/mma7660"),
mma8452q: require("./lib/mma8452q"),
lsm303dlhc: require("./lib/lsm303dlhc"),
l3gd20h: require("./lib/l3gd20h"),
"direct-i2c": require("./lib/direct-i2c")
};
module.exports = {
drivers: Object.keys(Drivers),
driver: function(opts) {
if (Drivers[opts.driver]) {
return new Drivers[opts.driver](opts);
}
return null;
}
};