#include <modm/math/algorithm/prescaler_counter.hpp>
 | 
| 
static constexpr Result  | from_range (T input_frequency, T desired_frequency, uint32_t max_counter, std::ranges::forward_range auto &&prescalers) | 
|   | From any forward range. 
  | 
|   | 
| 
static constexpr Result  | from_list (T input_frequency, T desired_frequency, uint32_t max_counter, std::initializer_list< uint32_t > prescalers) | 
|   | From a initializer list. 
  | 
|   | 
| template<typename Function >  | 
| static constexpr Result  | from_function (T input_frequency, T desired_frequency, uint32_t max_counter, uint32_t begin, uint32_t end, Function prescaler_modifier) | 
|   | 
| static constexpr Result  | from_linear (T input_frequency, T desired_frequency, uint32_t max_counter, uint32_t begin, uint32_t end) | 
|   | 
| static constexpr Result  | from_power (T input_frequency, T desired_frequency, uint32_t max_counter, uint32_t begin, uint32_t end) | 
|   | 
template<typename T>
class modm::GenericPrescalerCounter< T >
Computes the best fitting prescaler and counter value from a list.
- Note
 - For ranges the end is inclusive: [begin, end]! 
 
 
template<typename T > 
template<typename Function > 
  
  
      
        
          | static constexpr Result modm::GenericPrescalerCounter< T >::from_function  | 
          ( | 
          T  | 
          input_frequency,  | 
         
        
           | 
           | 
          T  | 
          desired_frequency,  | 
         
        
           | 
           | 
          uint32_t  | 
          max_counter,  | 
         
        
           | 
           | 
          uint32_t  | 
          begin,  | 
         
        
           | 
           | 
          uint32_t  | 
          end,  | 
         
        
           | 
           | 
          Function  | 
          prescaler_modifier  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestaticconstexpr   | 
  
 
From any linear range via modifier function. 
- Note
 - the range end is inclusive: [begin, end]. 
 
 
 
template<typename T > 
  
  
      
        
          | static constexpr Result modm::GenericPrescalerCounter< T >::from_linear  | 
          ( | 
          T  | 
          input_frequency,  | 
         
        
           | 
           | 
          T  | 
          desired_frequency,  | 
         
        
           | 
           | 
          uint32_t  | 
          max_counter,  | 
         
        
           | 
           | 
          uint32_t  | 
          begin,  | 
         
        
           | 
           | 
          uint32_t  | 
          end  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestaticconstexpr   | 
  
 
From any linear range. 
- Note
 - the range end is inclusive: [begin, end]. 
 
 
 
template<typename T > 
  
  
      
        
          | static constexpr Result modm::GenericPrescalerCounter< T >::from_power  | 
          ( | 
          T  | 
          input_frequency,  | 
         
        
           | 
           | 
          T  | 
          desired_frequency,  | 
         
        
           | 
           | 
          uint32_t  | 
          max_counter,  | 
         
        
           | 
           | 
          uint32_t  | 
          begin,  | 
         
        
           | 
           | 
          uint32_t  | 
          end  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestaticconstexpr   | 
  
 
From any 2-logarithmic range. 
- Note
 - the range end is inclusive: [begin, end]. 
 
- Parameters
 - 
  
    | begin | must be a power-of-two!  | 
    | end | must be a power-of-two!  | 
  
   
 
 
The documentation for this class was generated from the following file: