![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Karpova Lab fork of stateScript
Dependencies: SMARTWAV SOMO_II mbed
Fork of stateScript_v2_karpova by
Diff: mbedInterface/mbedInterface.h
- Revision:
- 3:d7b0a0890d96
- Parent:
- 0:8dbd6bd9167f
- Child:
- 5:abee20c0bf2a
diff -r 35266b266eaa -r d7b0a0890d96 mbedInterface/mbedInterface.h --- a/mbedInterface/mbedInterface.h Wed Jun 03 23:41:16 2015 +0000 +++ b/mbedInterface/mbedInterface.h Sat Oct 10 22:37:17 2015 +0000 @@ -17,6 +17,17 @@ #define NUMPORTS 9 //the number of ports available on this hardware +#define NUMEVENTS 50 +#define NUMCONDITIONS 150 +#define NUMINTCOMPARE 150 +#define NUMACTIONS 150 +#define NUMPORTMESSAGES 150 +#define NUMINTOPERATIONS 150 +#define NUMDISPLAYACTIONS 30 +#define NUMTRIGGERACTIONS 30 +#define NUMFUNCTIONS 50 +#define INPUTCHARBUFFERSIZE 3072 + /* @@ -65,8 +76,8 @@ void interrupt_up_callback(); void interrupt_down_callback(); protected: - - + + private: DigitalIn *inpin; @@ -83,11 +94,12 @@ bool readable(); char readChar(); void writeChar(char s); + int requestToWriteString(char *s, int numBytes); Serial *serialToPC; private: //Serial communication - + }; @@ -111,16 +123,18 @@ sDigitalOut* getDigitalOutPtr(int portNum); sDigitalIn* getDigitalInPtr(int portNum); sSound* createNewSoundAction(); + void pauseInterrupts(); + void resumeInterrupts(); void incrementClock(); void externalClockReset(); //needs to reset harware timer before calling immediateClockReset(); void mainLoopToDo(); - + protected: - + //Pins for clock syncing InterruptIn clockResetInt; InterruptIn clockExternalIncrement; - + private: MBEDDigitalIn dIn[NUMPORTS]; MBEDDigitalOut dOut[NUMPORTS];