1
1
package io .sloeber .providers ;
2
2
3
- import static io .sloeber .core .common .Const .*;
4
- import static org .junit .Assert .*;
5
-
6
3
import java .util .List ;
7
4
import java .util .Map ;
8
5
import java .util .TreeMap ;
9
6
10
7
import io .sloeber .core .BoardAttributes ;
11
8
import io .sloeber .core .Example ;
12
- import io .sloeber .core .MySystem ;
13
9
import io .sloeber .core .api .BoardDescription ;
14
10
import io .sloeber .core .api .BoardsManager ;
15
11
@@ -23,7 +19,10 @@ public class Teensy extends MCUBoard {
23
19
public final static String Teensy3_5_ID = "teensy35" ;
24
20
public final static String Teensy3_6_ID = "teensy36" ;
25
21
public final static String Teensy_LC_ID = "teensyLC" ;
26
- public final static String TEENSY_ARCHITECTURE_ID = "teensy" ;
22
+ public final static String TEENSY_PLATFORM_ID = "avr" ;
23
+ public final static String TEENSY_PROVIDER = "teensy" ;
24
+ private static final String jsonFileName = "package_teensy_index.json" ;
25
+ public static final String packageURL = "https://www.pjrc.com/teensy/package_teensy_index.json" ;
27
26
28
27
public static MCUBoard Teensy_LC () {
29
28
return new Teensy (Teensy_LC_ID );
@@ -72,12 +71,8 @@ private Teensy(String boardName) {
72
71
default :
73
72
break ;
74
73
}
74
+ myBoardDescriptor = BoardsManager .getBoardDescription (jsonFileName , TEENSY_PROVIDER , TEENSY_PLATFORM_ID ,boardName ,options );
75
75
76
- myBoardDescriptor = BoardsManager .getBoardDescription (LOCAL , MySystem .getTeensyBoard_txt (), "ignored" ,
77
- boardName , options );
78
- if (myBoardDescriptor == null ) {
79
- fail (boardName + " Board not found" );
80
- }
81
76
setUploadPort ("none" );
82
77
setAttributes ();
83
78
}
@@ -117,9 +112,6 @@ public Map<String, String> getBoardOptions(Example example) {
117
112
return ret ;
118
113
}
119
114
120
- public static List <MCUBoard > getAllBoards () {
121
- return getAllBoards (MySystem .getTeensyPlatform (), teensy2 ());
122
- }
123
115
124
116
@ Override
125
117
public MCUBoard createMCUBoard (BoardDescription boardDescriptor ) {
@@ -146,4 +138,13 @@ protected void setAttributes() {
146
138
myAttributes .wire1 = true ;
147
139
myAttributes .myArchitectures .add (myBoardDescriptor .getArchitecture ());
148
140
}
141
+
142
+ public static void installLatest () {
143
+ BoardsManager .installLatestPlatform (jsonFileName , TEENSY_PROVIDER , TEENSY_PLATFORM_ID );
144
+ }
145
+
146
+ public static List <MCUBoard > getAllBoards () {
147
+ // TODO Auto-generated method stub
148
+ return null ;
149
+ }
149
150
}
0 commit comments