aboutsummaryrefslogtreecommitdiff
path: root/libs/libupm/patches/004-uint8_t.patch
blob: 46d25edd74c7addd888b3fa5846ea9bd6d62b7c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
--- a/src/bma250e/bma250e.cxx
+++ b/src/bma250e/bma250e.cxx
@@ -195,35 +195,35 @@ BMA250E::BMA250E(std::string initStr) :
             fifoConfig(mode, axes);
         }
         if(tok.substr(0, 20) == "setInterruptEnable0:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
             setInterruptEnable0(bits);
         }
         if(tok.substr(0, 20) == "setInterruptEnable1:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
             setInterruptEnable1(bits);
         }
         if(tok.substr(0, 20) == "setInterruptEnable2:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
             setInterruptEnable2(bits);
         }
         if(tok.substr(0, 17) == "setInterruptMap0:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
             setInterruptMap0(bits);
         }
         if(tok.substr(0, 17) == "setInterruptMap1:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
             setInterruptMap1(bits);
         }
         if(tok.substr(0, 17) == "setInterruptMap2:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
             setInterruptMap2(bits);
         }
         if(tok.substr(0, 16) == "setInterruptSrc:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
             setInterruptSrc(bits);
         }
         if(tok.substr(0, 26) == "setInterruptOutputControl:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
             setInterruptOutputControl(bits);
         }
         if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
--- a/src/bmg160/bmg160.cxx
+++ b/src/bmg160/bmg160.cxx
@@ -173,23 +173,23 @@ BMG160::BMG160(std::string initStr) : mr
             fifoConfig(mode, axes);
         }
         if(tok.substr(0, 20) == "setInterruptEnable0:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
             setInterruptEnable0(bits);
         }
         if(tok.substr(0, 17) == "setInterruptMap0:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
             setInterruptMap0(bits);
         }
         if(tok.substr(0, 17) == "setInterruptMap1:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
             setInterruptMap1(bits);
         }
         if(tok.substr(0, 16) == "setInterruptSrc:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
             setInterruptSrc(bits);
         }
         if(tok.substr(0, 26) == "setInterruptOutputControl:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
             setInterruptOutputControl(bits);
         }
         if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
--- a/src/bmm150/bmm150.cxx
+++ b/src/bmm150/bmm150.cxx
@@ -170,19 +170,19 @@ BMM150::BMM150(std::string initStr) : mr
             setOpmode(opmode);
         }
         if(tok.substr(0, 19) == "setInterruptEnable:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
             setInterruptEnable(bits);
         }
         if(tok.substr(0, 19) == "setInterruptConfig:") {
-            u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
+            uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
             setInterruptConfig(bits);
         }
         if(tok.substr(0, 17) == "setRepetitionsXY:") {
-            u_int8_t reps = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
+            uint8_t reps = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
             setRepetitionsXY(reps);
         }
         if(tok.substr(0, 16) == "setRepetitionsZ:") {
-            u_int8_t reps = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
+            uint8_t reps = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
             setRepetitionsZ(reps);
         }
         if(tok.substr(0, 14) == "setPresetMode:") {