sfrp 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/base-library/Base.sfrp +6 -0
- data/base-library/Base/AVR/ATMEGA8/Timer.c +3 -1
- data/lib/sfrp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1734acd1394ff43b9eed30d54a6f5a296b50901b
|
4
|
+
data.tar.gz: 6eaa411b575921e2046b52c6c47500debe05303a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f7ca517a79b4a66959dc35b586fe0dcc263a82813b9b2946a9e57b11b544769449cf85a36fdba50ee2a24acc644d5baa4077a2fe17006a4f61bf70767a8490c
|
7
|
+
data.tar.gz: 6ad8f9e79e0ba9347896b54ec337a7e11b62c20a098be7baed44b544195af33549a5f022ef62f82a7927cdddf59578ab4f82ee413285e4bffb493806431311fa
|
data/base-library/Base.sfrp
CHANGED
@@ -16,6 +16,12 @@ snd(pair : (a, b)) : b = y where (_, y) = pair
|
|
16
16
|
infixl <> 0
|
17
17
|
op <>(a : Unit, b : Unit) : Unit = Unit
|
18
18
|
|
19
|
+
infixl >-> 0
|
20
|
+
op >->(x : a, y : b) : b = y
|
21
|
+
|
22
|
+
infixl <-< 0
|
23
|
+
op <-<(x : a, y : b) : a = x
|
24
|
+
|
19
25
|
foreign - as '-(Int) : Int
|
20
26
|
foreign + as '+(Int) : Int
|
21
27
|
foreign ! as '!(Bool) : Bool
|
@@ -30,6 +30,7 @@ int get_dsec(clk_io_kilohertz) {
|
|
30
30
|
return dsec;
|
31
31
|
}
|
32
32
|
|
33
|
+
// Param clk_io_kilohertz should be a even number.
|
33
34
|
int get_dmsec(clk_io_kilohertz) {
|
34
35
|
static unsigned int last = 0;
|
35
36
|
unsigned int current;
|
@@ -43,7 +44,8 @@ int get_dmsec(clk_io_kilohertz) {
|
|
43
44
|
}
|
44
45
|
|
45
46
|
// This function assumes 0.97656(=1000/1024)msec as 1msec
|
46
|
-
// so accumulates about 2% error.
|
47
|
+
// so accumulates about 2% numerical error.
|
48
|
+
// Argument which is not multiple of 256 also causes numerical error.
|
47
49
|
int get_uncertain_dmsec(clk_io_kilohertz) {
|
48
50
|
static unsigned int last = 0;
|
49
51
|
unsigned int current;
|
data/lib/sfrp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfrp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kensuke Sawada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|