mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-10-27 00:48:31 -04:00
To be able to reduce the power usage of the phone, magnetometer has been switched into interrupt driven LPDCM mode. Added some fixups maintaining current behavior on startup and disabling the tethering mode
46 lines
919 B
C++
46 lines
919 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "bsp/magnetometer/magnetometer.hpp"
|
|
|
|
static xQueueHandle qHandleIrq = NULL;
|
|
|
|
namespace bsp
|
|
{
|
|
|
|
namespace magnetometer
|
|
{
|
|
|
|
int32_t init(xQueueHandle qHandle)
|
|
{
|
|
|
|
qHandleIrq = qHandle;
|
|
return 1;
|
|
}
|
|
|
|
bool isPresent(void)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bsp::Board GetBoard(void)
|
|
{
|
|
return bsp::Board::Linux;
|
|
}
|
|
|
|
std::optional<bsp::KeyCodes> WorkerEventHandler()
|
|
{
|
|
return std::nullopt;
|
|
}
|
|
|
|
void enableIRQ()
|
|
{}
|
|
void initFirstReadout()
|
|
{}
|
|
bsp::KeyCodes getCurrentSliderPosition()
|
|
{
|
|
return bsp::KeyCodes::Undefined;
|
|
}
|
|
} // namespace magnetometer
|
|
} // namespace bsp
|