mirror of
https://github.com/eclipse/upm.git
synced 2025-03-27 19:00:42 +03:00
grovecircularled: fix up a missing mraa::DATA_OUT and formatting
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
90bf469245
commit
181b5f17ea
@ -37,17 +37,22 @@ using namespace upm;
|
|||||||
|
|
||||||
GroveCircularLED::GroveCircularLED (uint8_t di, uint8_t dcki)
|
GroveCircularLED::GroveCircularLED (uint8_t di, uint8_t dcki)
|
||||||
: m_clkPinCtx(dcki),
|
: m_clkPinCtx(dcki),
|
||||||
m_dataPinCtx(di) {
|
m_dataPinCtx(di)
|
||||||
|
{
|
||||||
mraa::Result error = mraa::SUCCESS;
|
mraa::Result error = mraa::SUCCESS;
|
||||||
|
|
||||||
m_clkPinCtx.useMmap(true);
|
|
||||||
m_dataPinCtx.useMmap(true);
|
|
||||||
|
|
||||||
// set direction (out)
|
// set direction (out)
|
||||||
|
error = m_dataPinCtx.dir(mraa::DIR_OUT);
|
||||||
|
if (error != mraa::SUCCESS) {
|
||||||
|
printError(error);
|
||||||
|
}
|
||||||
error = m_clkPinCtx.dir(mraa::DIR_OUT);
|
error = m_clkPinCtx.dir(mraa::DIR_OUT);
|
||||||
if (error != mraa::SUCCESS) {
|
if (error != mraa::SUCCESS) {
|
||||||
printError(error);
|
printError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_clkPinCtx.useMmap(true);
|
||||||
|
m_dataPinCtx.useMmap(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mraa::Result
|
mraa::Result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user