Data collection core that utilises the nine ring buffer. Intended as the base of other data collection projects
Diff: nine_ring/nine_ring.h
- Revision:
- 3:ba7863bdf478
- Parent:
- 2:8587554a1f52
--- a/nine_ring/nine_ring.h Sat Jul 11 17:32:02 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#ifndef NL_RING -#define NL_RING - -/* -J.J.Trinder, based on original code for midi projects 199X -updateded sometime to the MBED - -Yeh its atad klunky, it works and is useful to explain things to people... -*/ -#define buff_size 120 -class NRing { -public: - NRing(); - - void ring_init(); - int ring_count(); - long get_next(); - int RingWriteToBuffer(long); /* put byte in buffer */ - - protected: - volatile int inIndex; /* where to put next byte */ - volatile int inCount; /* how full is the buffer */ - volatile int outIndex; /* for output to sio */ - - - long opBuffer[buff_size]; /* our Ring out buffer */ -}; - -#endif \ No newline at end of file