libDaisy
Hardware Library for Daisy
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
daisy::PWMHandle::Channel::Config Struct Reference

Configuration struct for an individual channel. More...

Detailed Description

Configuration struct for an individual channel.

Note
These settings are used during initialization and changing them afterwards may not have the desired effect.

#include <pwm.h>

Public Types

enum class  Polarity { HIGH = 0 , LOW }
 Output polarity. More...
 

Public Member Functions

 Config ()
 
 Config (Pin pin_, Polarity polarity_=Polarity::HIGH)
 

Public Attributes

Pin pin
 Pin to use for this channel. Ensure that this is the proper pin for the timer and channel. Use PORTX (default) to select the channel's default pin.
 
Polarity polarity
 

Member Enumeration Documentation

◆ Polarity

Output polarity.

Enumerator
HIGH 

Output is high when channel is active

LOW 

Output is low when channel is active

Constructor & Destructor Documentation

◆ Config() [1/2]

daisy::PWMHandle::Channel::Config::Config ( )
inline

◆ Config() [2/2]

daisy::PWMHandle::Channel::Config::Config ( Pin pin_,
Polarity polarity_ = Polarity::HIGH )
inline

Member Data Documentation

◆ pin

Pin daisy::PWMHandle::Channel::Config::pin

Pin to use for this channel. Ensure that this is the proper pin for the timer and channel. Use PORTX (default) to select the channel's default pin.

◆ polarity

Polarity daisy::PWMHandle::Channel::Config::polarity

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