typehints/pyboard/pyb.pyi [4079:4161]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ) -> "TimerChannel":
        """
      If only a channel number is passed, then a previously initialized channel
      object is returned (or ``None`` if there is no previous channel).
      
      Otherwise, a TimerChannel object is initialized and returned.
      
      Each channel can be configured to perform pwm, output compare, or
      input capture. All channels share the same underlying timer, which means
      that they share the same timer clock.
      
      Keyword arguments:
      
        - ``mode`` can be one of:
      
          - ``Timer.PWM`` --- configure the timer in PWM mode (active high).
          - ``Timer.PWM_INVERTED`` --- configure the timer in PWM mode (active low).
          - ``Timer.OC_TIMING`` --- indicates that no pin is driven.
          - ``Timer.OC_ACTIVE`` --- the pin will be made active when a compare match occurs (active is determined by polarity)
          - ``Timer.OC_INACTIVE`` --- the pin will be made inactive when a compare match occurs.
          - ``Timer.OC_TOGGLE`` --- the pin will be toggled when an compare match occurs.
          - ``Timer.OC_FORCED_ACTIVE`` --- the pin is forced active (compare match is ignored).
          - ``Timer.OC_FORCED_INACTIVE`` --- the pin is forced inactive (compare match is ignored).
          - ``Timer.IC`` --- configure the timer in Input Capture mode.
          - ``Timer.ENC_A`` --- configure the timer in Encoder mode. The counter only changes when CH1 changes.
          - ``Timer.ENC_B`` --- configure the timer in Encoder mode. The counter only changes when CH2 changes.
          - ``Timer.ENC_AB`` --- configure the timer in Encoder mode. The counter changes when CH1 or CH2 changes.
      
        - ``callback`` - as per TimerChannel.callback()
      
        - ``pin`` None (the default) or a Pin object. If specified (and not None)
          this will cause the alternate function of the the indicated pin
          to be configured for this timer channel. An error will be raised if
          the pin doesn't support any alternate functions for this timer channel.
      
      Keyword arguments for Timer.PWM modes:
      
        - ``pulse_width`` - determines the initial pulse width value to use.
        - ``pulse_width_percent`` - determines the initial pulse width percentage to use.
      
      Keyword arguments for Timer.OC modes:
      
        - ``compare`` - determines the initial value of the compare register.
      
        - ``polarity`` can be one of:
      
          - ``Timer.HIGH`` - output is active high
          - ``Timer.LOW`` - output is active low
      
      Optional keyword arguments for Timer.IC modes:
      
        - ``polarity`` can be one of:
      
          - ``Timer.RISING`` - captures on rising edge.
          - ``Timer.FALLING`` - captures on falling edge.
          - ``Timer.BOTH`` - captures on both edges.
      
        Note that capture only works on the primary channel, and not on the
        complimentary channels.
      
      Notes for Timer.ENC modes:
      
        - Requires 2 pins, so one or both pins will need to be configured to use
          the appropriate timer AF using the Pin API.
        - Read the encoder value using the timer.counter() method.
        - Only works on CH1 and CH2 (and not on CH1N or CH2N)
        - The channel number is ignored when setting the encoder mode.
      
      PWM Example::
      
          timer = pyb.Timer(2, freq=1000)
          ch2 = timer.channel(2, pyb.Timer.PWM, pin=pyb.Pin.board.X2, pulse_width=8000)
          ch3 = timer.channel(3, pyb.Timer.PWM, pin=pyb.Pin.board.X3, pulse_width=16000)
      """
    @overload
    def channel(
        self,
        channel: int,
        /,
        mode: int,
        *,
        callback: Callable[[Timer], None] | None = None,
        pin: Pin | None = None,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



typehints/pyboard/pyb.pyi [4163:4245]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ) -> "TimerChannel":
        """
      If only a channel number is passed, then a previously initialized channel
      object is returned (or ``None`` if there is no previous channel).
      
      Otherwise, a TimerChannel object is initialized and returned.
      
      Each channel can be configured to perform pwm, output compare, or
      input capture. All channels share the same underlying timer, which means
      that they share the same timer clock.
      
      Keyword arguments:
      
        - ``mode`` can be one of:
      
          - ``Timer.PWM`` --- configure the timer in PWM mode (active high).
          - ``Timer.PWM_INVERTED`` --- configure the timer in PWM mode (active low).
          - ``Timer.OC_TIMING`` --- indicates that no pin is driven.
          - ``Timer.OC_ACTIVE`` --- the pin will be made active when a compare match occurs (active is determined by polarity)
          - ``Timer.OC_INACTIVE`` --- the pin will be made inactive when a compare match occurs.
          - ``Timer.OC_TOGGLE`` --- the pin will be toggled when an compare match occurs.
          - ``Timer.OC_FORCED_ACTIVE`` --- the pin is forced active (compare match is ignored).
          - ``Timer.OC_FORCED_INACTIVE`` --- the pin is forced inactive (compare match is ignored).
          - ``Timer.IC`` --- configure the timer in Input Capture mode.
          - ``Timer.ENC_A`` --- configure the timer in Encoder mode. The counter only changes when CH1 changes.
          - ``Timer.ENC_B`` --- configure the timer in Encoder mode. The counter only changes when CH2 changes.
          - ``Timer.ENC_AB`` --- configure the timer in Encoder mode. The counter changes when CH1 or CH2 changes.
      
        - ``callback`` - as per TimerChannel.callback()
      
        - ``pin`` None (the default) or a Pin object. If specified (and not None)
          this will cause the alternate function of the the indicated pin
          to be configured for this timer channel. An error will be raised if
          the pin doesn't support any alternate functions for this timer channel.
      
      Keyword arguments for Timer.PWM modes:
      
        - ``pulse_width`` - determines the initial pulse width value to use.
        - ``pulse_width_percent`` - determines the initial pulse width percentage to use.
      
      Keyword arguments for Timer.OC modes:
      
        - ``compare`` - determines the initial value of the compare register.
      
        - ``polarity`` can be one of:
      
          - ``Timer.HIGH`` - output is active high
          - ``Timer.LOW`` - output is active low
      
      Optional keyword arguments for Timer.IC modes:
      
        - ``polarity`` can be one of:
      
          - ``Timer.RISING`` - captures on rising edge.
          - ``Timer.FALLING`` - captures on falling edge.
          - ``Timer.BOTH`` - captures on both edges.
      
        Note that capture only works on the primary channel, and not on the
        complimentary channels.
      
      Notes for Timer.ENC modes:
      
        - Requires 2 pins, so one or both pins will need to be configured to use
          the appropriate timer AF using the Pin API.
        - Read the encoder value using the timer.counter() method.
        - Only works on CH1 and CH2 (and not on CH1N or CH2N)
        - The channel number is ignored when setting the encoder mode.
      
      PWM Example::
      
          timer = pyb.Timer(2, freq=1000)
          ch2 = timer.channel(2, pyb.Timer.PWM, pin=pyb.Pin.board.X2, pulse_width=8000)
          ch3 = timer.channel(3, pyb.Timer.PWM, pin=pyb.Pin.board.X3, pulse_width=16000)
      """
    @overload
    def channel(
        self,
        channel: int,
        /,
        mode: int,
        *,
        callback: Callable[[Timer], None] | None = None,
        pin: Pin | None = None,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



