OLD | NEW |
1 // Copyright (c) 2016, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library stm32f746g.lcd; | 5 library stm32f746g.lcd; |
6 | 6 |
7 import 'dart:fletch.ffi'; | 7 import 'dart:fletch.ffi'; |
8 | 8 |
9 final _lcdHeight = ForeignLibrary.main.lookup('lcd_height'); | 9 final _lcdHeight = ForeignLibrary.main.lookup('lcd_height'); |
10 final _lcdWidth = ForeignLibrary.main.lookup('lcd_width'); | 10 final _lcdWidth = ForeignLibrary.main.lookup('lcd_width'); |
11 final _lcdClear = ForeignLibrary.main.lookup('lcd_clear'); | 11 final _lcdClear = ForeignLibrary.main.lookup('lcd_clear'); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 _lcdSetForegroundColor.icall$1(color._rgb8888); | 80 _lcdSetForegroundColor.icall$1(color._rgb8888); |
81 _lcdDrawLine.icall$4(x1, y1, x2, y2); | 81 _lcdDrawLine.icall$4(x1, y1, x2, y2); |
82 } | 82 } |
83 | 83 |
84 void writeText(int x, int y, String text) { | 84 void writeText(int x, int y, String text) { |
85 var m = new ForeignMemory.fromStringAsUTF8(text); | 85 var m = new ForeignMemory.fromStringAsUTF8(text); |
86 _lcdDisplayString.icall$3(x, y, m); | 86 _lcdDisplayString.icall$3(x, y, m); |
87 m.free(); | 87 m.free(); |
88 } | 88 } |
89 } | 89 } |
OLD | NEW |