AYAB Arduino Firmware 0.95
The goal of the AYAB project is to provide an alternative way to control the famous Brother KH-9xx range of knitting machines using a computer
Beeper Class Reference

Class to actuate a beeper connected to PIEZO_PIN. More...

#include <beeper.h>

Inheritance diagram for Beeper:
Inheritance graph
Collaboration diagram for Beeper:
Collaboration graph

Public Member Functions

void init (bool enabled) final
 
bool enabled () final
 
BeepState getState () final
 
void ready () final
 
void finishedLine () final
 
void endWork () final
 
void error () final
 
void schedule () final
 

Private Member Functions

void beep (uint8_t repeats)
 

Private Attributes

BeepState m_currentState
 
BeepState m_nextState
 
unsigned long m_nextTime
 
uint8_t m_repeat
 
bool m_enabled
 

Detailed Description

Class to actuate a beeper connected to PIEZO_PIN.

Member Function Documentation

◆ beep()

void Beeper::beep ( uint8_t  repeats)
private

Generic beep function.

/param repeats number of beeps

Here is the caller graph for this function:

◆ enabled()

bool Beeper::enabled ( )
finalvirtual

Get beeper enabled flag

Implements BeeperInterface.

Here is the caller graph for this function:

◆ endWork()

void Beeper::endWork ( )
finalvirtual

Beep to indicate the end the knitting pattern

Implements BeeperInterface.

References beep().

Here is the call graph for this function:

◆ error()

void Beeper::error ( )
finalvirtual

Implements BeeperInterface.

◆ finishedLine()

void Beeper::finishedLine ( )
finalvirtual

Beep to indicate the end of a line

Implements BeeperInterface.

References beep().

Here is the call graph for this function:

◆ getState()

BeepState Beeper::getState ( )
finalvirtual

Get beeper state

Implements BeeperInterface.

◆ init()

void Beeper::init ( bool  enabled)
finalvirtual

Initialize beeper

Implements BeeperInterface.

References enabled().

Here is the call graph for this function:

◆ ready()

void Beeper::ready ( )
finalvirtual

Beep to indicate readiness

Implements BeeperInterface.

References beep().

Here is the call graph for this function:

◆ schedule()

void Beeper::schedule ( )
finalvirtual

Beep handler scheduled from main loop

Implements BeeperInterface.


The documentation for this class was generated from the following files: