LCOV - code coverage report
Current view: top level - src/MIDI_Outputs - CCButton.hpp (source / functions) Hit Total Coverage
Test: b8a30b4b7040ae1abf162fd0a258beaa2de43626 Lines: 2 2 100.0 %
Date: 2024-12-21 21:28:55 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <MIDI_Outputs/Abstract/MIDIButton.hpp>
       4             : #include <MIDI_Senders/DigitalCCSender.hpp>
       5             : 
       6             : BEGIN_CS_NAMESPACE
       7             : 
       8             : /**
       9             :  * @brief   A class of MIDIOutputElement%s that read the input of a **momentary
      10             :  *          push button or switch**, and send out MIDI **Control Change**
      11             :  *          events.
      12             :  * 
      13             :  *          A value of 0x7F is sent when the button is pressed, and a value of
      14             :  *          0x00 is sent when the button is released.  
      15             :  *          The button is debounced in software.  
      16             :  *          This version cannot be banked.
      17             :  * 
      18             :  * @ingroup MIDIOutputElements
      19             :  */
      20             : class CCButton : public MIDIButton<DigitalCCSender> {
      21             :   public:
      22             :     /**
      23             :      * @brief   Create a new CCButton object with the given pin,
      24             :      *          the given controller number and channel.
      25             :      *
      26             :      * @param   pin
      27             :      *          The digital input pin with the button connected.  
      28             :      *          The internal pull-up resistor will be enabled.
      29             :      * @param   address
      30             :      *          The MIDI address containing the controller number [0, 119], 
      31             :      *          channel [Channel_1, Channel_16], and optional cable number 
      32             :      *          [Cable_1, Cable_16].
      33             :      * @param   sender
      34             :      *          The MIDI sender to use.
      35             :      */
      36           2 :     CCButton(pin_t pin, MIDIAddress address, const DigitalCCSender &sender = {})
      37           2 :         : MIDIButton(pin, address, sender) {}
      38             : };
      39             : 
      40             : END_CS_NAMESPACE

Generated by: LCOV version 1.15