35#ifndef __DIGITALINOUTHBRIDGE_H__
36#define __DIGITALINOUTHBRIDGE_H__
43#include "StatusManager.h"
103#ifndef HIDE_FROM_DOXYGEN
219 bool blocking =
false,
bool forceDuration =
false);
234 void TonePeriodic(uint16_t frequency, uint32_t timeOn, uint32_t timeOff);
315 bool State(int16_t newState)
override;
331#ifndef HIDE_FROM_DOXYGEN
343 uint32_t m_toneStartTick;
344 uint32_t m_toneOnTicks;
345 uint32_t m_toneOffTicks;
349 const PeripheralRoute *m_pwmAInfo;
350 const PeripheralRoute *m_pwmBInfo;
356 bool m_forceToneDuration;
371 void Refresh()
override;
378 inline void ToneFrequency(uint16_t frequency);
385 void FaultState(
bool isFaulted);
391 const PeripheralRoute *inputInfo,
392 const PeripheralRoute *outputInfo,
393 const PeripheralRoute *pwmAInfo,
394 const PeripheralRoute *pwmBInfo,
396 bool invertDigitalLogic);
Base class for all connector classes.
ClearCore Digital Output Connector class.
Defines the Peripheral Route structure, used in HardwareMapping.
LED shift register access class.
ClearCorePins
ClearCore PIN definitions.
Definition SysConnectors.h:54
virtual ConnectorModes Mode()
Get the connector's operational mode.
Definition Connector.h:309
ConnectorModes
All possible operational modes for a connector.
Definition Connector.h:74
ConnectorTypes
The different types of ClearCore connectors.
Definition Connector.h:172
@ H_BRIDGE_TYPE
Definition Connector.h:247
ClearCore H-Bridge digital output connector class.
Definition DigitalInOutHBridge.h:66
bool IsWritable() override
Get R/W status of the connector.
void ToneAmplitude(int16_t amplitude)
Set the amplitude of a PWM output for tone generation.
Connector::ConnectorTypes Type() override
Get connector type.
Definition DigitalInOutHBridge.h:165
int16_t State() override
Get connector's last sampled value.
bool Mode(ConnectorModes newMode) override
Set the connector's operational mode.
void ToneTimed(uint16_t frequency, uint32_t duration, bool blocking=false, bool forceDuration=false)
Output a tone from the H-Bridge for the specified duration.
ToneState
Possible states of the tone generator.
Definition DigitalInOutHBridge.h:78
@ TONE_CONTINUOUS
Definition DigitalInOutHBridge.h:86
@ TONE_PERIODIC_ON
Definition DigitalInOutHBridge.h:95
@ TONE_TIMED
Definition DigitalInOutHBridge.h:90
@ TONE_PERIODIC_OFF
Definition DigitalInOutHBridge.h:100
@ TONE_OFF
Definition DigitalInOutHBridge.h:82
void TonePeriodic(uint16_t frequency, uint32_t timeOn, uint32_t timeOff)
Output a periodic tone from the H-Bridge.
void ToneContinuous(uint16_t frequency)
Output a continuous tone from the H-Bridge.
volatile const ToneState & ToneActiveState()
Accessor for the state of the tone currently active on the H-Bridge.
Definition DigitalInOutHBridge.h:259
virtual ConnectorModes Mode() override
Get the connector's operational mode.
Definition DigitalInOutHBridge.h:124
bool State(int16_t newState) override
Set the state of the Connector.
ClearCore digital output connector class.
Definition DigitalInOut.h:60
ClearCore Status Register Manager class.
Definition StatusManager.h:37
ClearCore Board Supervisory System Manager.
Definition SysManager.h:58
Namespace to encompass the ClearCore board API.
Definition AdcManager.h:36