Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | List of all members
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

Examples:
Sensors/shift-register-out/render.cpp.

Member Function Documentation

void ShiftRegisterOut::setClockPeriod ( unsigned int  period)

Set the period of the clock expressed in samples. The minimum value is 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.
Examples:
Sensors/shift-register-out/render.cpp.
void ShiftRegisterOut::setData ( const bool *  dataBuf,
unsigned int  length 
)

Parameters
lengththe length of the data.
void ShiftRegisterOut::process ( BelaContext context)

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

Examples:
Sensors/shift-register-out/render.cpp.
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: