95 int16_t
begin(uint8_t
pin, uint16_t dutyCycle = 0,
bool invert =
false)
161 if (frequency_Hz == 0)
#define SW_LE16(_a)
Convert a uint16_t to two bytes in little endian format for array initialization.
#define SW_LE32(_a)
Convert a uint32_t to four bytes in little endian format for array initialization.
Wombat4A_B_PWMFrequencyValues_t
@ SW4AB_PWMFrequency_3900_Hz
@ SW4AB_PWMFrequency_8_Hz
@ SW4AB_PWMFrequency_244_Hz
@ SW4AB_PWMFrequency_4_Hz
@ SW4AB_PWMFrequency_32_Hz
@ SW4AB_PWMFrequency_63_Hz
@ SW4AB_PWMFrequency_31250_Hz
@ SW4AB_PWMFrequency_125_Hz
@ SW4AB_PWMFrequency_976_Hz
@ SW4AB_PWMFrequency_488_Hz
@ SW4AB_PWMFrequency_16_Hz
@ SW4AB_PWMFrequency_15625_Hz
@ SW4AB_PWMFrequency_1952_Hz
@ SW4AB_PWMFrequency_2_Hz
@ SW4AB_PWMFrequency_1_Hz
@ SW4AB_PWMFrequency_7800_Hz
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
SerialWombatAbstractScaledOutput(SerialWombatChip &sw)
Constructor for the SerialWombatAbstractScaledOutput Class.
uint16_t writePublicData(uint16_t value)
Write a 16 bit value to this pin.
SerialWombatPin(SerialWombatChip &serialWombatChip)
Instantiates a Serial Wombat Pin.
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)
uint8_t pin()
Returns the current SW pin number. Used primarily for virtual calls by derived classes.
void writeDutyCycle(uint16_t dutyCycle)
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.
int16_t setFrequency_SW4AB(Wombat4A_B_PWMFrequencyValues_t frequency)
SerialWombatPWM_4AB(SerialWombatChip &serialWombat)
void writePeriod_uS(uint32_t period_uS)
Set the PWM period on a Serial Wombat 18AB chip's PWM.
SerialWombatPWM_18AB(SerialWombatChip &serialWombat)
uint8_t pin()
fulfills a virtual function requirement of SerialWombatAbstractScaledOutput
uint8_t swPinModeNumber()
fulfills a virtual function requirement of SerialWombatAbstractScaledOutput
void writeFrequency_Hz(uint32_t frequency_Hz)
Set the PWM frequency on a Serial Wombat 18AB chip's PWM.