LCOV - code coverage report
Current view: top level - AP_Notify - ToshibaLED_I2C.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 1 100.0 %
Date: 2026-09-09 11:02:08 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /*
       2             :    ToshibaLED I2C driver
       3             : 
       4             :    This program is free software: you can redistribute it and/or modify
       5             :    it under the terms of the GNU General Public License as published by
       6             :    the Free Software Foundation, either version 3 of the License, or
       7             :    (at your option) any later version.
       8             : 
       9             :    This program is distributed in the hope that it will be useful,
      10             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :    GNU General Public License for more details.
      13             : 
      14             :    You should have received a copy of the GNU General Public License
      15             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.
      16             :  */
      17             : #pragma once
      18             : 
      19             : #include "AP_Notify_config.h"
      20             : 
      21             : #if AP_NOTIFY_TOSHIBALED_ENABLED
      22             : 
      23             : #include <AP_HAL/I2CDevice.h>
      24             : #include "RGBLed.h"
      25             : 
      26             : class ToshibaLED_I2C : public RGBLed
      27             : {
      28             : public:
      29             :     ToshibaLED_I2C(uint8_t bus);
      30        4188 :     ~ToshibaLED_I2C() { delete _dev; }
      31             :     bool init(void) override;
      32             : protected:
      33             :     bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
      34             : 
      35             : private:
      36             :     AP_HAL::I2CDevice *_dev;
      37             :     void _timer(void);
      38             :     bool _need_update;
      39             :     struct {
      40             :         uint8_t r, g, b;
      41             :     } rgb;
      42             :     uint8_t _bus;
      43             : };
      44             : 
      45             : #endif  // AP_NOTIFY_TOSHIBALED_ENABLED

Generated by: LCOV version 1.14