Serial Wombat Arduino Library
Loading...
Searching...
No Matches
SerialWombatPWM_4AB Class Reference

Extends the SerialWombatPWM class with SW4A/SW4B specific functionality. More...

#include <SerialWombatPWM.h>

Inheritance diagram for SerialWombatPWM_4AB:
Collaboration diagram for SerialWombatPWM_4AB:

Public Member Functions

 SerialWombatPWM_4AB (SerialWombatChip &serialWombat)
 
int16_t setFrequency_SW4AB (Wombat4A_B_PWMFrequencyValues_t frequency)
 
- Public Member Functions inherited from SerialWombatPWM
 SerialWombatPWM (SerialWombatChip &serialWombat)
 Constructor for SerialWombatPWM class.
 
int16_t begin (uint8_t pin, uint16_t dutyCycle=0, bool invert=false)
 Initialize a pin that has been declared as PWM.
 
void writeDutyCycle (uint16_t dutyCycle)
 
- Public Member Functions inherited from SerialWombatPin
 SerialWombatPin (SerialWombatChip &serialWombatChip)
 Instantiates a Serial Wombat Pin.
 
 SerialWombatPin (SerialWombatChip &serialWombatChip, uint8_t pin)
 Instantiates a Serial Wombat Pin.
 
uint16_t readPublicData ()
 Read the 16 Bit public data associated with this pin.
 
void pinMode (uint8_t mode, bool pullDown=false, bool openDrain=false)
 Set pin to INPUT or OUTPUT, with options for pull Ups and open Drain settings.
 
void digitalWrite (uint8_t val)
 Set output pin High or Low.
 
int digitalRead ()
 Reads the state of the Pin.
 
uint16_t writePublicData (uint16_t value)
 Write a 16 bit value to this pin.
 
uint8_t pin ()
 Returns the current SW pin number. Used primarily for virtual calls by derived classes.
 
uint8_t swPinModeNumber ()
 Returns the Mode number. Used primarily by derived classes to populate packet data.
 
int16_t initPacketNoResponse (uint8_t packetNumber, uint8_t param0=0x55, uint8_t param1=0x55, uint8_t param2=0x55, uint8_t param3=0x55, uint8_t param4=0x55)
 
int16_t initPacketNoResponse (uint8_t packetNumber, uint16_t param0=0x55, uint8_t param1=0x55, uint8_t param2=0x55, uint8_t param3=0x55)
 
int16_t initPacketNoResponse (uint8_t packetNumber, uint16_t param0, uint16_t param1, uint8_t param2=0x55)
 
int16_t disable ()
 Disables the pin mode (if applicable)
 
int16_t enablePullup (bool enabled)
 Enables the weak pull up on a pin. Implemented on SW18AB only.
 
int16_t enablePullDown (bool enabled)
 Enables the weak pull down on a pin. Implemented on SW18AB only.
 
int16_t enableOpenDrain (bool enabled)
 Enables open drain mode on a pin. Implemented on SW18AB only.
 

Additional Inherited Members

- Protected Attributes inherited from SerialWombatPin
uint8_t _pin = 255
 
SerialWombatChip_sw
 
uint8_t _pinMode = 0
 

Detailed Description

Extends the SerialWombatPWM class with SW4A/SW4B specific functionality.

Definition at line 120 of file SerialWombatPWM.h.

Constructor & Destructor Documentation

◆ SerialWombatPWM_4AB()

SerialWombatPWM_4AB::SerialWombatPWM_4AB ( SerialWombatChip & serialWombat)
inline

Definition at line 123 of file SerialWombatPWM.h.

Member Function Documentation

◆ setFrequency_SW4AB()

int16_t SerialWombatPWM_4AB::setFrequency_SW4AB ( Wombat4A_B_PWMFrequencyValues_t frequency)
inline

Definition at line 138 of file SerialWombatPWM.h.