:mod:`cpufreq` --- CPU Frequency Control
========================================

.. module:: cpufreq
   :synopsis: CPU Frequency Control

The ``cpufreq`` module is used to get/set the CPU frequency to save power.

.. note::

   This module is not supported on the OpenMV Cam M4 because the CPU frequency,
   for various reasons, cannot be set independently of peripherals.

Functions
---------

.. function:: set_frequency(supported_frequency)

   Sets the CPU frequency to a supported frequency in MHz. Peripherals
   frequencies are not changed. Only the CPU performance.

.. function:: get_current_frequencies()

   Returns (cpu_clk_in_mhz, hclk_in_mhz, pclk1_in_mhz, pclk2_in_mhz).

.. function:: get_supported_frequencies()

   Returns the supported CPU frequencies [120, 144, 168, 192, 216] on the
   OpenMV Cam M7 and [60/50, 120/100, 240/200, 480/400] on the OpenMV Cam H7 Rev V/XY silicon in MHz.
