@@ -8,13 +8,29 @@ import {
88 MICROBIT_HAL_PIN_P0 ,
99 MICROBIT_HAL_PIN_P1 ,
1010 MICROBIT_HAL_PIN_P2 ,
11+ MICROBIT_HAL_PIN_P3 ,
12+ MICROBIT_HAL_PIN_P4 ,
13+ MICROBIT_HAL_PIN_P5 ,
14+ MICROBIT_HAL_PIN_P6 ,
15+ MICROBIT_HAL_PIN_P7 ,
16+ MICROBIT_HAL_PIN_P8 ,
17+ MICROBIT_HAL_PIN_P9 ,
18+ MICROBIT_HAL_PIN_P10 ,
19+ MICROBIT_HAL_PIN_P11 ,
20+ MICROBIT_HAL_PIN_P12 ,
21+ MICROBIT_HAL_PIN_P13 ,
22+ MICROBIT_HAL_PIN_P14 ,
23+ MICROBIT_HAL_PIN_P15 ,
24+ MICROBIT_HAL_PIN_P16 ,
25+ MICROBIT_HAL_PIN_P19 ,
26+ MICROBIT_HAL_PIN_P20 ,
1127} from "./constants" ;
1228import * as conversions from "./conversions" ;
1329import { DataLogging } from "./data-logging" ;
1430import { Display } from "./display" ;
1531import { FileSystem } from "./fs" ;
1632import { Microphone } from "./microphone" ;
17- import { Pin } from "./pins" ;
33+ import { Pin , StubPin , TouchPin } from "./pins" ;
1834import { Radio } from "./radio" ;
1935import { RangeSensor , State } from "./state" ;
2036import { ModuleWrapper } from "./wasm" ;
@@ -121,17 +137,34 @@ export class Board {
121137 ) ,
122138 ] ;
123139 this . pins = Array ( 33 ) ;
124- this . pins [ MICROBIT_HAL_PIN_FACE ] = new Pin (
140+ this . pins [ MICROBIT_HAL_PIN_FACE ] = new TouchPin (
125141 "pinLogo" ,
126142 {
127143 element : this . svg . querySelector ( "#Logo" ) ! ,
128144 label : ( ) => this . formattedMessage ( { id : "touch-logo" } ) ,
129145 } ,
130146 onChange
131147 ) ;
132- this . pins [ MICROBIT_HAL_PIN_P0 ] = new Pin ( "pin0" , null , onChange ) ;
133- this . pins [ MICROBIT_HAL_PIN_P1 ] = new Pin ( "pin1" , null , onChange ) ;
134- this . pins [ MICROBIT_HAL_PIN_P2 ] = new Pin ( "pin2" , null , onChange ) ;
148+ this . pins [ MICROBIT_HAL_PIN_P0 ] = new TouchPin ( "pin0" , null , onChange ) ;
149+ this . pins [ MICROBIT_HAL_PIN_P1 ] = new TouchPin ( "pin1" , null , onChange ) ;
150+ this . pins [ MICROBIT_HAL_PIN_P2 ] = new TouchPin ( "pin2" , null , onChange ) ;
151+ this . pins [ MICROBIT_HAL_PIN_P3 ] = new StubPin ( "pin3" ) ;
152+ this . pins [ MICROBIT_HAL_PIN_P4 ] = new StubPin ( "pin4" ) ;
153+ this . pins [ MICROBIT_HAL_PIN_P5 ] = new StubPin ( "pin5" ) ;
154+ this . pins [ MICROBIT_HAL_PIN_P6 ] = new StubPin ( "pin6" ) ;
155+ this . pins [ MICROBIT_HAL_PIN_P7 ] = new StubPin ( "pin7" ) ;
156+ this . pins [ MICROBIT_HAL_PIN_P8 ] = new StubPin ( "pin8" ) ;
157+ this . pins [ MICROBIT_HAL_PIN_P9 ] = new StubPin ( "pin9" ) ;
158+ this . pins [ MICROBIT_HAL_PIN_P10 ] = new StubPin ( "pin10" ) ;
159+ this . pins [ MICROBIT_HAL_PIN_P11 ] = new StubPin ( "pin11" ) ;
160+ this . pins [ MICROBIT_HAL_PIN_P12 ] = new StubPin ( "pin12" ) ;
161+ this . pins [ MICROBIT_HAL_PIN_P13 ] = new StubPin ( "pin13" ) ;
162+ this . pins [ MICROBIT_HAL_PIN_P14 ] = new StubPin ( "pin14" ) ;
163+ this . pins [ MICROBIT_HAL_PIN_P15 ] = new StubPin ( "pin15" ) ;
164+ this . pins [ MICROBIT_HAL_PIN_P16 ] = new StubPin ( "pin16" ) ;
165+ this . pins [ MICROBIT_HAL_PIN_P19 ] = new StubPin ( "pin19" ) ;
166+ this . pins [ MICROBIT_HAL_PIN_P20 ] = new StubPin ( "pin20" ) ;
167+
135168 this . audio = new Audio ( ) ;
136169 this . temperature = new RangeSensor ( "temperature" , - 5 , 50 , 21 , "°C" ) ;
137170 this . accelerometer = new Accelerometer ( onChange ) ;
0 commit comments