mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 19:31:15 +03:00
Add changes getting values for upm parameters
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
cb27acbc04
commit
a8cd0f72ec
@ -167,9 +167,9 @@ BMA250E::BMA250E(std::string initStr) : mraaIo(initStr)
|
||||
enableFIFO(useFIFO);
|
||||
}
|
||||
if(tok.substr(0, 9) == "writeReg:") {
|
||||
uint8_t reg = std::stoi(tok.substr(9), &sz, 0);
|
||||
uint8_t reg = std::stoul(tok.substr(9), &sz, 0);
|
||||
tok = tok.substr(9);
|
||||
uint8_t val = std::stoi(tok.substr(sz+1), nullptr, 0);
|
||||
uint8_t val = std::stoul(tok.substr(sz+1), nullptr, 0);
|
||||
writeReg(reg, val);
|
||||
}
|
||||
if(tok.substr(0, 9) == "setRange:") {
|
||||
@ -195,35 +195,35 @@ BMA250E::BMA250E(std::string initStr) : mraaIo(initStr)
|
||||
fifoConfig(mode, axes);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable0:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(20), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable0(bits);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable1:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(20), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable1(bits);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable2:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(20), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable2(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap0:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(17), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap0(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap1:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(17), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap1(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap2:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(17), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap2(bits);
|
||||
}
|
||||
if(tok.substr(0, 16) == "setInterruptSrc:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(16), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
setInterruptSrc(bits);
|
||||
}
|
||||
if(tok.substr(0, 26) == "setInterruptOutputControl:") {
|
||||
u_int8_t bits = (u_int8_t)std::stoi(tok.substr(26), nullptr, 0);
|
||||
u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
|
||||
setInterruptOutputControl(bits);
|
||||
}
|
||||
if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
|
||||
|
Reference in New Issue
Block a user