~aleteoryx/muditaos

7eebea8698aabbdd04bde5be492d12535ac40ccc — Marek Niepieklo 5 years ago 3623a84
[EGD-5377] Add USB charger detection

Added USB stack support for detecting connected charger
Added i.MX RT 1051 HW configuration
Added notification to EventManager for detected charger
M module-bsp/board/linux/battery-charger/battery_charger.cpp => module-bsp/board/linux/battery-charger/battery_charger.cpp +29 -4
@@ 12,6 12,7 @@ namespace bsp::battery_charger
    namespace
    {
        xQueueHandle IRQQueueHandle         = nullptr;
        xQueueHandle DCDQueueHandle         = nullptr;
        TaskHandle_t batteryWorkerHandle    = nullptr;
        constexpr auto batteryFIFO          = "/tmp/fifoBattKeys";
        constexpr auto fifoFileAccessRights = 0666;


@@ 27,6 28,10 @@ namespace bsp::battery_charger
        constexpr auto batteryLevelUp         = ']';
        constexpr auto batteryLevelDown       = '[';

        constexpr auto chargerTypeDcdSDP = 'l';
        constexpr auto chargerTypeDcdCDP = ';';
        constexpr auto chargerTypeDcdDCP = '\'';

        void battery_worker(void *parameters)
        {
            mkfifo(batteryFIFO, fifoFileAccessRights);


@@ 34,6 39,8 @@ namespace bsp::battery_charger
            // Open FIFO for write only
            int fd = open(batteryFIFO, O_RDONLY | O_NONBLOCK);

            xQueueHandle targetQueueHandle;

            while (true) {
                std::uint8_t buff[fifoBuffSize];
                std::int32_t readBytes = read(fd, buff, fifoBuffSize);


@@ 44,6 51,7 @@ namespace bsp::battery_charger
                    case chargerPlugStateChange:
                        notification = static_cast<std::uint8_t>(batteryIRQSource::INOKB);
                        plugged      = !plugged;
                        targetQueueHandle = IRQQueueHandle;
                        break;
                    case batteryLevelUp:
                        notification = static_cast<std::uint8_t>(batteryIRQSource::INTB);


@@ 55,6 63,7 @@ namespace bsp::battery_charger
                                Store::Battery::modify().state = Store::Battery::State::PluggedNotCharging;
                            }
                        }
                        targetQueueHandle = IRQQueueHandle;
                        break;
                    case batteryLevelDown:
                        notification = static_cast<std::uint8_t>(batteryIRQSource::INTB);


@@ 64,22 73,38 @@ namespace bsp::battery_charger
                            // charging but not 100% anymore
                            Store::Battery::modify().state = Store::Battery::State::Charging;
                        }
                        targetQueueHandle = IRQQueueHandle;
                        break;
                    case chargerTypeDcdSDP:
                        notification      = static_cast<std::uint8_t>(batteryChargerType::DcdSDP);
                        targetQueueHandle = DCDQueueHandle;
                        break;
                    case chargerTypeDcdCDP:
                        notification      = static_cast<std::uint8_t>(batteryChargerType::DcdCDP);
                        targetQueueHandle = DCDQueueHandle;
                        break;
                    case chargerTypeDcdDCP:
                        notification      = static_cast<std::uint8_t>(batteryChargerType::DcdDCP);
                        targetQueueHandle = DCDQueueHandle;
                        break;
                    }
                    xQueueSend(IRQQueueHandle, &notification, queueTimeoutTicks);
                    xQueueSend(targetQueueHandle, &notification, queueTimeoutTicks);
                }
                vTaskDelay(taskDelay);
            }
        }
    } // namespace

    int init(xQueueHandle queueHandle)
    int init(xQueueHandle irqQueueHandle, xQueueHandle dcdQueueHandle)
    {
        IRQQueueHandle = queueHandle;
        if (xTaskCreate(battery_worker, "battery", 512, queueHandle, 0, &batteryWorkerHandle) != pdPASS) {
        IRQQueueHandle = irqQueueHandle;
        DCDQueueHandle = dcdQueueHandle;

        if (xTaskCreate(battery_worker, "battery", 512, nullptr, 0, &batteryWorkerHandle) != pdPASS) {
            return 1;
        }
        Store::Battery::modify().level = battLevel;

        return 0;
    }


M module-bsp/board/rt1051/bsp/battery-charger/battery_charger.cpp => module-bsp/board/rt1051/bsp/battery-charger/battery_charger.cpp +16 -2
@@ 85,6 85,7 @@ namespace bsp::battery_charger
        drivers::I2CAddress topControllerAddress  = {TOP_CONTROLLER_I2C_ADDR, 0, i2cSubaddresSize};

        xQueueHandle IRQQueueHandle = nullptr;
        xQueueHandle DCDQueueHandle = nullptr;

        int fuelGaugeWrite(Registers registerAddress, std::uint16_t value)
        {


@@ 425,14 426,15 @@ namespace bsp::battery_charger
        }
    } // namespace

    int init(xQueueHandle queueHandle)
    int init(xQueueHandle irqQueueHandle, xQueueHandle dcdQueueHandle)
    {
        drivers::DriverI2CParams i2cParams;
        i2cParams.baudrate = static_cast<std::uint32_t>(BoardDefinitions::BATTERY_CHARGER_I2C_BAUDRATE);
        i2c = drivers::DriverI2C::Create(static_cast<drivers::I2CInstances>(BoardDefinitions::BATTERY_CHARGER_I2C),
                                         i2cParams);

        IRQQueueHandle = queueHandle;
        IRQQueueHandle = irqQueueHandle;
        DCDQueueHandle = dcdQueueHandle;

        configureBatteryCharger();



@@ 470,6 472,7 @@ namespace bsp::battery_charger
        gpio->DisableInterrupt(1 << static_cast<uint32_t>(BoardDefinitions::BATTERY_CHARGER_INOKB_PIN));

        IRQQueueHandle = nullptr;
        DCDQueueHandle = nullptr;

        i2c.reset();
        gpio.reset();


@@ 551,4 554,15 @@ namespace bsp::battery_charger
        return xHigherPriorityTaskWoken;
    }

    extern "C"
    {
        void USB_ChargerDetectedCB(std::uint8_t detectedType)
        {
            BaseType_t xHigherPriorityTaskWoken = pdFALSE;
            if (DCDQueueHandle != nullptr) {
                std::uint8_t val = static_cast<std::uint8_t>(detectedType);
                xQueueSend(DCDQueueHandle, &val, portMAX_DELAY);
            }
        }
    }
} // namespace bsp::battery_charger

M module-bsp/board/rt1051/bsp/usb => module-bsp/board/rt1051/bsp/usb +1 -1
@@ 1,1 1,1 @@
Subproject commit 7f26e521b58c5ed4a9d2485c64479d193de1c91a
Subproject commit 88b775af153a7020ea998245d2b4fcd4fc16217a

M module-bsp/board/rt1051/common/cmsis/MIMXRT1051.h => module-bsp/board/rt1051/common/cmsis/MIMXRT1051.h +48 -1
@@ 1,3 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

/*
** ###################################################################
**     Processors:          MIMXRT1051CVJ5B


@@ 27650,7 27653,11 @@ typedef struct
        __I uint32_t VBUS_DETECT_STAT; /**< USB VBUS Detect Status Register, array offset: 0x1C0, array step: 0x60 */
        uint8_t RESERVED_0[12];
        __I uint32_t CHRG_DETECT_STAT; /**< USB Charger Detect Status Register, array offset: 0x1D0, array step: 0x60 */
        uint8_t RESERVED_1[28];
        uint8_t RESERVED_1[12];
        __IO uint32_t LOOPBACK;                          /**< USB Loopback Test Register, array offset: 0x1E0, array step: 0x60 */
        __IO uint32_t LOOPBACK_SET;                      /**< USB Loopback Test Register, array offset: 0x1E4, array step: 0x60 */
        __IO uint32_t LOOPBACK_CLR;                      /**< USB Loopback Test Register, array offset: 0x1E8, array step: 0x60 */
        __IO uint32_t LOOPBACK_TOG;                      /**< USB Loopback Test Register, array offset: 0x1EC, array step: 0x60 */
        __IO uint32_t MISC;     /**< USB Misc Register, array offset: 0x1F0, array step: 0x60 */
        __IO uint32_t MISC_SET; /**< USB Misc Register, array offset: 0x1F4, array step: 0x60 */
        __IO uint32_t MISC_CLR; /**< USB Misc Register, array offset: 0x1F8, array step: 0x60 */


@@ 27913,6 27920,46 @@ typedef struct
/* The count of USB_ANALOG_CHRG_DETECT_STAT */
#define USB_ANALOG_CHRG_DETECT_STAT_COUNT (2U)

/*! @name LOOPBACK - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_UTMI_TESTSTART_MASK  (0x1U)
#define USB_ANALOG_LOOPBACK_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_UTMI_TESTSTART(x)    (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK */
#define USB_ANALOG_LOOPBACK_COUNT                (2U)

/*! @name LOOPBACK_SET - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_MASK (0x1U)
#define USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART(x) (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK_SET */
#define USB_ANALOG_LOOPBACK_SET_COUNT            (2U)

/*! @name LOOPBACK_CLR - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_MASK (0x1U)
#define USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART(x) (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK_CLR */
#define USB_ANALOG_LOOPBACK_CLR_COUNT            (2U)

/*! @name LOOPBACK_TOG - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_MASK (0x1U)
#define USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART(x) (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK_TOG */
#define USB_ANALOG_LOOPBACK_TOG_COUNT            (2U)

/*! @name MISC - USB Misc Register */
/*! @{ */
#define USB_ANALOG_MISC_HS_USE_EXTERNAL_R_MASK  (0x1U)

M module-bsp/board/rt1051/common/cmsis/MIMXRT1051_features.h => module-bsp/board/rt1051/common/cmsis/MIMXRT1051_features.h +5 -0
@@ 1,3 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

/*
** ###################################################################
**     Version:             rev. 0.1, 2017-01-10


@@ 143,6 146,8 @@
#define FSL_FEATURE_SOC_USBNC_COUNT (2)
/* @brief USBPHY availability on the SoC. */
#define FSL_FEATURE_SOC_USBPHY_COUNT (2)
/* @brief USB_ANALOG availability on the SoC. */
#define FSL_FEATURE_SOC_USB_ANALOG_COUNT (1)
/* @brief USDHC availability on the SoC. */
#define FSL_FEATURE_SOC_USDHC_COUNT (2)
/* @brief WDOG availability on the SoC. */

M module-bsp/board/rt1051/common/cmsis/MIMXRT1052.h => module-bsp/board/rt1051/common/cmsis/MIMXRT1052.h +48 -1
@@ 1,3 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

/*
** ###################################################################
**     Processors:          MIMXRT1051CVJ5B


@@ 27650,7 27653,11 @@ typedef struct
        __I uint32_t VBUS_DETECT_STAT; /**< USB VBUS Detect Status Register, array offset: 0x1C0, array step: 0x60 */
        uint8_t RESERVED_0[12];
        __I uint32_t CHRG_DETECT_STAT; /**< USB Charger Detect Status Register, array offset: 0x1D0, array step: 0x60 */
        uint8_t RESERVED_1[28];
        uint8_t RESERVED_1[12];
        __IO uint32_t LOOPBACK;                          /**< USB Loopback Test Register, array offset: 0x1E0, array step: 0x60 */
        __IO uint32_t LOOPBACK_SET;                      /**< USB Loopback Test Register, array offset: 0x1E4, array step: 0x60 */
        __IO uint32_t LOOPBACK_CLR;                      /**< USB Loopback Test Register, array offset: 0x1E8, array step: 0x60 */
        __IO uint32_t LOOPBACK_TOG;                      /**< USB Loopback Test Register, array offset: 0x1EC, array step: 0x60 */
        __IO uint32_t MISC;     /**< USB Misc Register, array offset: 0x1F0, array step: 0x60 */
        __IO uint32_t MISC_SET; /**< USB Misc Register, array offset: 0x1F4, array step: 0x60 */
        __IO uint32_t MISC_CLR; /**< USB Misc Register, array offset: 0x1F8, array step: 0x60 */


@@ 27913,6 27920,46 @@ typedef struct
/* The count of USB_ANALOG_CHRG_DETECT_STAT */
#define USB_ANALOG_CHRG_DETECT_STAT_COUNT (2U)

/*! @name LOOPBACK - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_UTMI_TESTSTART_MASK  (0x1U)
#define USB_ANALOG_LOOPBACK_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_UTMI_TESTSTART(x)    (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK */
#define USB_ANALOG_LOOPBACK_COUNT                (2U)

/*! @name LOOPBACK_SET - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_MASK (0x1U)
#define USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART(x) (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_SET_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK_SET */
#define USB_ANALOG_LOOPBACK_SET_COUNT            (2U)

/*! @name LOOPBACK_CLR - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_MASK (0x1U)
#define USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART(x) (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_CLR_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK_CLR */
#define USB_ANALOG_LOOPBACK_CLR_COUNT            (2U)

/*! @name LOOPBACK_TOG - USB Loopback Test Register */
/*! @{ */
#define USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_MASK (0x1U)
#define USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_SHIFT (0U)
#define USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART(x) (((uint32_t)(((uint32_t)(x)) << USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_SHIFT)) & USB_ANALOG_LOOPBACK_TOG_UTMI_TESTSTART_MASK)
/*! @} */

/* The count of USB_ANALOG_LOOPBACK_TOG */
#define USB_ANALOG_LOOPBACK_TOG_COUNT            (2U)

/*! @name MISC - USB Misc Register */
/*! @{ */
#define USB_ANALOG_MISC_HS_USE_EXTERNAL_R_MASK  (0x1U)

M module-bsp/board/rt1051/common/cmsis/MIMXRT1052_features.h => module-bsp/board/rt1051/common/cmsis/MIMXRT1052_features.h +5 -0
@@ 1,3 1,6 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

/*
** ###################################################################
**     Version:             rev. 0.1, 2017-01-10


@@ 143,6 146,8 @@
#define FSL_FEATURE_SOC_USBNC_COUNT (2)
/* @brief USBPHY availability on the SoC. */
#define FSL_FEATURE_SOC_USBPHY_COUNT (2)
/* @brief USB_ANALOG availability on the SoC. */
#define FSL_FEATURE_SOC_USB_ANALOG_COUNT (1)
/* @brief USDHC availability on the SoC. */
#define FSL_FEATURE_SOC_USDHC_COUNT (2)
/* @brief WDOG availability on the SoC. */

M module-bsp/bsp/battery-charger/battery_charger.hpp => module-bsp/bsp/battery-charger/battery_charger.hpp +17 -1
@@ 11,6 11,8 @@ extern "C"
#include "queue.h"
}

#include <array>

namespace bsp::battery_charger
{
	using StateOfCharge = std::uint8_t;


@@ 33,7 35,16 @@ namespace bsp::battery_charger
		SOCOnePercentChange = 1 << 7
	};

	int init(xQueueHandle queueHandle);
	enum class batteryChargerType{
		DcdTimeOut = 0x00U,     /*!< Dcd detect result is timeout */
		DcdUnknownType,         /*!< Dcd detect result is unknown type */
		DcdError,               /*!< Dcd detect result is error*/
		DcdSDP,                 /*!< The SDP facility is detected */
		DcdCDP,                 /*!< The CDP facility is detected */
		DcdDCP,                 /*!< The DCP facility is detected */
	};

	int init(xQueueHandle irqQueueHandle, xQueueHandle dcdQueueHandle);

	void deinit();



@@ 50,6 61,11 @@ namespace bsp::battery_charger
	BaseType_t INOKB_IRQHandler();

	BaseType_t INTB_IRQHandler();

	extern "C"
	{
	void USB_ChargerDetectedCB(std::uint8_t detectedType);
	}
} // bsp::battery_charger



M module-services/service-eink/board/linux/renderer/src/RWindow.cpp => module-services/service-eink/board/linux/renderer/src/RWindow.cpp +4 -1
@@ 1,4 1,4 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "RWindow.hpp"


@@ 61,6 61,9 @@ void RWindow::keyMapInit(void)
    batteryKeyMap.insert(std::pair<int8_t, uint32_t>('[', 1));
    batteryKeyMap.insert(std::pair<int8_t, uint32_t>(']', 2));
    batteryKeyMap.insert(std::pair<int8_t, uint32_t>('p', 3));
    batteryKeyMap.insert(std::pair<int8_t, uint32_t>('l', 3));
    batteryKeyMap.insert(std::pair<int8_t, uint32_t>(';', 4));
    batteryKeyMap.insert(std::pair<int8_t, uint32_t>('\'', 5));
}
void RWindow::updateDrawBuffer()
{

M module-services/service-evtmgr/EventManager.cpp => module-services/service-evtmgr/EventManager.cpp +3 -0
@@ 308,6 308,8 @@ sys::ReturnCodes EventManager::InitHandler()
    sys::WorkerQueueInfo qTorch = {"qTorch", sizeof(uint8_t), 5};
    // light sensor queue
    sys::WorkerQueueInfo qLightSensor = {"qLightSensor", sizeof(uint8_t), 5};
    // charger detector queue
    sys::WorkerQueueInfo qChargerDetect = {"qChargerDetect", sizeof(uint8_t), 5};

    std::list<sys::WorkerQueueInfo> list;



@@ 319,6 321,7 @@ sys::ReturnCodes EventManager::InitHandler()
    list.push_back(qMagnetometer);
    list.push_back(qTorch);
    list.push_back(qLightSensor);
    list.push_back(qChargerDetect);

    EventWorker->init(list);
    EventWorker->run();

M module-services/service-evtmgr/WorkerEvent.cpp => module-services/service-evtmgr/WorkerEvent.cpp +11 -1
@@ 180,6 180,14 @@ bool WorkerEvent::handleMessage(uint32_t queueID)
        LOG_DEBUG("Light sensor IRQ");
    }

    if (queueID == static_cast<uint32_t>(WorkerEventQueues::queueChargerDetect)) {
        uint8_t notification;
        if (!queue->Dequeue(&notification, 0)) {
            return false;
        }
        LOG_DEBUG("USB charger type: %d", notification);
    }

    return true;
}



@@ 189,7 197,9 @@ bool WorkerEvent::init(std::list<sys::WorkerQueueInfo> queuesList)
    bsp::vibrator::init();
    bsp::keyboard_Init(queues[static_cast<int32_t>(WorkerEventQueues::queueKeyboardIRQ)]->GetQueueHandle());
    bsp::headset::Init(queues[static_cast<int32_t>(WorkerEventQueues::queueHeadsetIRQ)]->GetQueueHandle());
    bsp::battery_charger::init(queues[static_cast<int32_t>(WorkerEventQueues::queueBattery)]->GetQueueHandle());
    auto queueBatteryHandle = queues[static_cast<int32_t>(WorkerEventQueues::queueBattery)]->GetQueueHandle();
    auto queueChargerDetect = queues[static_cast<int32_t>(WorkerEventQueues::queueChargerDetect)]->GetQueueHandle();
    bsp::battery_charger::init(queueBatteryHandle, queueChargerDetect);
    bsp::rtc_Init(queues[static_cast<int32_t>(WorkerEventQueues::queueRTC)]->GetQueueHandle());
    bsp::cellular::init(queues[static_cast<int32_t>(WorkerEventQueues::queueCellular)]->GetQueueHandle());
    bsp::magnetometer::init(queues[static_cast<int32_t>(WorkerEventQueues::queueMagnetometerIRQ)]->GetQueueHandle());

M module-services/service-evtmgr/service-evtmgr/WorkerEvent.hpp => module-services/service-evtmgr/service-evtmgr/WorkerEvent.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 38,7 38,8 @@ enum class WorkerEventQueues
    queueCellular,
    queueMagnetometerIRQ,
    queueTorch,
    queueLightSensor
    queueLightSensor,
    queueChargerDetect
};

class WorkerEvent : public sys::Worker