Skip to content

Commit ab37758

Browse files
committed
Support V1 version
1 parent e8b23c6 commit ab37758

18 files changed

+2657
-8
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
built
2+
node_modules
3+
yotta_modules
4+
yotta_targets
5+
pxt_modules
6+
*.db
7+
*.tgz
8+
.header.json

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: node_js
2+
node_js:
3+
- "8.9.4"
4+
script:
5+
- "npm install -g pxt"
6+
- "pxt target microbit"
7+
- "pxt install"
8+
- "pxt build"
9+
sudo: false
10+
cache:
11+
directories:
12+
- npm_modules
13+
- pxt_modules

.vscode/settings.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"editor.formatOnType": true,
3+
"files.autoSave": "afterDelay",
4+
"files.watcherExclude": {
5+
"**/.git/objects/**": true,
6+
"**/built/**": true,
7+
"**/node_modules/**": true,
8+
"**/yotta_modules/**": true,
9+
"**/yotta_targets": true,
10+
"**/pxt_modules/**": true
11+
},
12+
"files.associations": {
13+
"*.blocks": "html",
14+
"*.jres": "json"
15+
},
16+
"search.exclude": {
17+
"**/built": true,
18+
"**/node_modules": true,
19+
"**/yotta_modules": true,
20+
"**/yotta_targets": true,
21+
"**/pxt_modules": true
22+
}
23+
}

.vscode/tasks.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
// A task runner that calls the MakeCode (PXT) compiler
3+
{
4+
"version": "2.0.0",
5+
"tasks": [{
6+
"label": "pxt deploy",
7+
"type": "shell",
8+
"command": "pxt deploy",
9+
"group": "build",
10+
"problemMatcher": [ "$tsc" ]
11+
}, {
12+
"label": "pxt build",
13+
"type": "shell",
14+
"command": "pxt build",
15+
"group": "test",
16+
"problemMatcher": [ "$tsc" ]
17+
}, {
18+
"label": "pxt clean",
19+
"type": "shell",
20+
"command": "pxt clean",
21+
"group": "test",
22+
"problemMatcher": [ "$tsc" ]
23+
}, {
24+
"label": "pxt serial",
25+
"type": "shell",
26+
"command": "pxt serial",
27+
"group": "test",
28+
"problemMatcher": [ "$tsc" ]
29+
}]
30+
}

LCD1in8.cpp

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#include "pxt.h"
2+
#include "LCD_Driver.h"
3+
4+
using namespace pxt;
5+
6+
//% weight=20 color=#436EEE icon="\uf108"
7+
namespace LCD1IN8 {
8+
LCD_Driver *LCD;
9+
10+
//%
11+
void LCD_Init() {
12+
LCD->LCD_Init();
13+
}
14+
15+
//%
16+
void LCD_Clear() {
17+
LCD->LCD_Clear(WHITE);
18+
LCD->LCD_ClearBuf();
19+
}
20+
21+
//%
22+
void LCD_Filling(int Color) {
23+
LCD->LCD_Clear(Color);
24+
}
25+
26+
//%
27+
void LCD_Display() {
28+
LCD->LCD_Display();
29+
}
30+
31+
//%
32+
void LCD_DisplayWindows(int Xstart, int Ystart, int Xend, int Yend) {
33+
LCD->LCD_DisplayWindows(Xstart, Ystart, Xend, Yend);
34+
}
35+
36+
//%
37+
void LCD_SetBL(int Lev) {
38+
LCD->LCD_SetBL(Lev);
39+
}
40+
41+
//%
42+
void DrawPoint(int x, int y, int Color, int Dot) {
43+
LCD->LCD_DrawPoint(x, y, Color, Dot);
44+
}
45+
46+
//%
47+
void DisChar_1207(int Xchar, int Ychar, int Char_Offset, int Color){
48+
LCD->LCD_DisChar_1207(Xchar, Ychar, Char_Offset, Color);
49+
}
50+
}
51+

0 commit comments

Comments
 (0)