Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
ShiftRegisterOut Class Reference
Inheritance diagram for ShiftRegisterOut:
ShiftRegister

Public Member Functions

void setClockPeriod (unsigned int period)
void setData (const std::vector< bool > &dataBuf)
void setData (const bool *dataBuf, unsigned int length)
void process (BelaContext *context)
void process (BelaContext *context, unsigned int n) override
Public Member Functions inherited from ShiftRegister
 ShiftRegister ()
 ShiftRegister (const Pins &pins, unsigned int maxSize)
void setup (const Pins &pins, unsigned int maxSize)
bool dataReady ()

Additional Inherited Members

Protected Types inherited from ShiftRegister
enum  State { kStart , kTransmitting , kStop , kIdle }
Protected Attributes inherited from ShiftRegister
Pins pins
State state = kStop
std::vector< bool > data
bool pinModeSet = false
bool notified = true

Detailed Description

Member Function Documentation

◆ setClockPeriod()

void ShiftRegisterOut::setClockPeriod ( unsigned int period)

Set the period of the clock expressed in samples. The minimum value is 2.

◆ setData() [1/2]

void ShiftRegisterOut::setData ( const std::vector< bool > & dataBuf)

Set new data bits to be shifted out. Data willl be shifted out during the subsequent calls to process(), until dataSent() returns true. If the size of the data passed in is larger than maxSize was, the internal buffer holding a copy of the data will be reallocated, which is not a real-time safe operation.

Parameters
dataBufthe data to be shifted out.

◆ setData() [2/2]

void ShiftRegisterOut::setData ( const bool * dataBuf,
unsigned int length )

Parameters
lengththe length of the data.

◆ process() [1/2]

void ShiftRegisterOut::process ( BelaContext * context)

Shift I/O data for all the digital frames in context.

◆ process() [2/2]

void ShiftRegisterOut::process ( BelaContext * context,
unsigned int n )
overridevirtual

Shift I/O data for frame n.

Implements ShiftRegister.


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