|
Arduino LibHelix
|
Common Simple Arduino API. More...
#include <CommonHelix.h>
Public Member Functions | |
| virtual void | begin () |
| Starts the processing. | |
| virtual void | end () |
| Releases the reserved memory. | |
| virtual size_t | write (const void *in_ptr, size_t in_size) |
| decodes the next segments from the intput. The data can be provided in one short or in small incremental pieces. It is suggested to be called in the Arduino Loop. If the provided data does not fit into the buffer it is split up into small pieces that fit | |
| operator bool () | |
| returns true if active | |
Protected Member Functions | |
| virtual size_t | maxFrameSize ()=0 |
| Provides the maximum frame size - this is allocated on the heap and you can reduce the heap size my minimizing this value. | |
| void | setMaxFrameSize (size_t len) |
| Define your optimized maximum frame size. | |
| virtual size_t | maxPCMSize ()=0 |
| Provides the maximum pcm buffer size - this is allocated on the heap and you can reduce the heap size my minimizing this value. | |
| void | setMaxPWMSize (size_t len) |
| Define your optimized maximum pcm buffer size. | |
| virtual int | findSynchWord (int offset=0)=0 |
| Finds the synchronization word in the frame buffer (starting from the indicated offset) | |
| virtual void | decode (Range r)=0 |
| Decodes a frame. | |
| size_t | appendToBuffer (const void *in_ptr, int in_size) |
| we add the data to the buffer until it is full | |
| size_t | writeFrame (const void *in_ptr, size_t in_size) |
| appends the data to the frame buffer and decodes | |
| Range | synchronizeFrame () |
| returns true if we have a valid start and end synch word. | |
| Range | frameRange () |
| determines the next start and end synch word in the buffer | |
| virtual void | checkMemory () |
| void | advanceFrameBuffer (int offset) |
Common Simple Arduino API.