RS232 control for TVOne products
Diff: spk_tvone_mbed.h
- Revision:
- 18:d765b0d9271c
- Parent:
- 17:68b9bb89da2b
- Child:
- 20:ebddf3ddb1f6
--- a/spk_tvone_mbed.h Tue Dec 04 19:09:06 2012 +0000 +++ b/spk_tvone_mbed.h Wed Dec 05 16:02:31 2012 +0000 @@ -37,18 +37,26 @@ bool command(uint8_t channel, uint8_t window, int32_t func, int32_t payload); bool readCommand(uint8_t channel, uint8_t window, int32_t func, int32_t &payload); + struct processorType {int version; int productType; int boardType;}; + processorType getProcessorType(); + + bool setResolution(int resolution, int edidSlot); + bool setHDCPOn(bool state); + bool uploadEDID(FILE* file, int edidSlotIndex); bool uploadImage(FILE* file, int sisIndex); - - bool setCustomResolutions(); - bool setHDCPOn(bool state); + bool uploadCustomResolutions(); - int timeoutCommandPeriod; - int minimumCommandPeriod; + void setCommandTimeoutPeriod(int millis); + void setCommandMinimumPeriod(int millis); + void increaseCommandPeriods(int millis); + void resetCommandPeriods(); int millisSinceLastCommandSent(); private: + struct processorType processor; + bool command(commandType readWrite, int* ackBuffer, int ackLength, uint8_t channel, uint8_t window, int32_t func, int32_t payload); bool uploadFile(char command, FILE* file, int dataLength, int index); @@ -59,6 +67,9 @@ Serial *serial; Serial *debug; + int commandTimeoutPeriod; + int commandMinimumPeriod; + Timer timer; Ticker timerCheckTicker; void timerCheck();