STM32LIB
Static Public Member Functions | List of all members
STM32LIB::ClockControl< Peripheral > Struct Template Reference

Reset and Clock Control acesss. More...

#include <ClockControl.hpp>

Static Public Member Functions

static void on ()
 
static void off ()
 
static void reset ()
 

Detailed Description

template<PeripheralName Peripheral>
struct STM32LIB::ClockControl< Peripheral >

Reset and Clock Control acesss.

Alllows to enable/disable peripheral clock.
Example usage:

using namespace STM32LIB;
int main (void){
ClockControl<GPIOA>::on(); //This enables the GPIOA peripheral clock
}
Template Parameters
PeripheralThe peripheral we want to control. The names are defined in PeripheralName
Warning
The specific MCU may not have all the peripherals in the PeripheralName group

Member Function Documentation

template<PeripheralName Peripheral>
static void STM32LIB::ClockControl< Peripheral >::on ( )
inlinestatic

Enables the Peripheral clock

template<PeripheralName Peripheral>
static void STM32LIB::ClockControl< Peripheral >::off ( )
inlinestatic

Disables the Peripheral clock

template<PeripheralName Peripheral>
static void STM32LIB::ClockControl< Peripheral >::reset ( )
inlinestatic

Resets the Peripheral


The documentation for this struct was generated from the following file: