273 lines
17 KiB
Text
273 lines
17 KiB
Text
|
0 Teensy 4.1 - I/O Extensions
|
||
|
1
|
||
|
2 . This vocabulary provides words for using the additional I/O
|
||
|
3 . on the Teensy 4.1 implementation of ilo.
|
||
|
4
|
||
|
5 . Currently this covers reading/writing the GPIO pins and the
|
||
|
6 . RTC. Other devices are expected to be added in the future.
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0 (teensy4.1)
|
||
|
1
|
||
|
2 . These blocks add words for interacting with the i/o on the
|
||
|
3 . Teensy 4.1
|
||
|
4
|
||
|
5 :teensy:io (...n-) #100 io ;
|
||
|
6
|
||
|
7 :pin:high (n-) #1 teensy:io ;
|
||
|
8 :pin:low (n-) #2 teensy:io ;
|
||
|
9 :pin:mode (nm-) #3 teensy:io ;
|
||
|
10 :pin:read (n-m) #4 teensy:io ;
|
||
|
11
|
||
|
12 :delay/ms (n-) #10 teensy:io ;
|
||
|
13 :delay/us (n-) #11 teensy:io ;
|
||
|
14 :delay/ns (n-) #12 teensy:io ;
|
||
|
15
|
||
|
save next new
|
||
|
0 (teensy4.1)
|
||
|
1
|
||
|
2 . The Teensy has a real time clock. The words here allow you to
|
||
|
3 . make use of this.
|
||
|
4
|
||
|
5 :rtc:hour (-n) #20 teensy:io ;
|
||
|
6 :rtc:minute (-n) #21 teensy:io ;
|
||
|
7 :rtc:second (-n) #22 teensy:io ;
|
||
|
8 :rtc:day (-n) #23 teensy:io ;
|
||
|
9 :rtc:month (-n) #24 teensy:io ;
|
||
|
10 :rtc:year (-n) #25 teensy:io ;
|
||
|
11 :rtc:set (hmsdmy-) #26 teensy:io ;
|
||
|
12 :rtc:adjust (n-) #27 teensy:io ;
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0 (teensy4.1)
|
||
|
1
|
||
|
2 &pin:high \pin:on
|
||
|
3 &pin:low \pin:off
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|
||
|
0
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
4
|
||
|
5
|
||
|
6
|
||
|
7
|
||
|
8
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
save next new
|