Skip to content

# Class evam::PwmDriver

template <int kPin>

ClassList > evam > PwmDriver

Simple PWM output driver (unipolar). More...

- `#include <evamPwmDriver.h>`

## Public Functions

Type | Name
--- | ---
| PwmDriver () Constructor. Initializes the pin as output.

## Protected Functions

Type | Name
--- | ---
void | actUnipolar (unsigned short aValue) Set unipolar output value.

## Detailed Description

Converts 0..1000 input to 0..255 PWM duty cycle. Suitable for MOSFETs and other unipolar devices.

Template parameters:

- `kPin` PWM output pin number.

## Public Functions Documentation

### function PwmDriver

Constructor. Initializes the pin as output.

    inline evam::PwmDriver::PwmDriver ()

## Protected Functions Documentation

### function actUnipolar

Set unipolar output value.

    inline void evam::PwmDriver::actUnipolar (
        unsigned short aValue
    )

Parameters:

- `aValue` Input range 0..1000, mapped to 0..255 PWM.

The documentation for this class was generated from the following file `src/evamPwmDriver.h`