OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 | 6 |
7 import 'package:i2c/i2c.dart'; | 7 import 'package:i2c/i2c.dart'; |
8 import 'package:i2c/devices/hts221.dart'; | 8 import 'package:i2c/devices/hts221.dart'; |
9 | 9 |
10 const int slaveId = 0x12; | 10 const int slaveId = 0x12; |
11 | 11 |
(...skipping 29 matching lines...) Expand all Loading... |
41 | 41 |
42 main() { | 42 main() { |
43 var address = new I2CBusAddressMock(); | 43 var address = new I2CBusAddressMock(); |
44 var bus = address.open(); | 44 var bus = address.open(); |
45 var device = new I2CDevice(slaveId, bus); | 45 var device = new I2CDevice(slaveId, bus); |
46 var hts221 = new HTS221(device); | 46 var hts221 = new HTS221(device); |
47 | 47 |
48 // Test the power on sequence. | 48 // Test the power on sequence. |
49 hts221.powerOn(); | 49 hts221.powerOn(); |
50 } | 50 } |
OLD | NEW |