Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Ghost_Codes.h
- Revision:
- 0:d6c40db60579
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Ghost_Codes.h Thu Feb 09 08:28:08 2017 +0000 @@ -0,0 +1,67 @@ +/* +Ghostcode enkel geldig voor OPTIMA projector +andere vertalingen moet je nog programmeren +Na een reset, wordt de optima menu code verzonden, +bij elke reset. +Als je de blauwe user knop indrukt wordt de laatst +ontvangen code terug uitgestuurd. + +De variabelen zijn unsigned long. +Enkel de 32- laagste bits worden verstuurd. +Langere code kunnen een aangepaste variabele vragen!!!!! +*/ + + +unsigned long Get_Ghost_Code(unsigned long NEC_Code) +{ + unsigned long Ghost_Code; + switch (NEC_Code) { + case 0xFA05F708: + strcpy(Toets,"Up"); + Ghost_Code=0x3EC1CD32; // optima Page+ toets + break; + case 0xFF00F708: + strcpy(Toets,"Down"); + Ghost_Code=0x00FFCD32;// optima Page- toets + break; + case 0xF708F708: + strcpy(Toets,"Left"); + Ghost_Code=0x00FFCD32;// optima Source toets + break; + case 0xFE01F708: + strcpy(Toets,"Right"); + Ghost_Code=0x00FFCD32;// optima Resync toets + break; + case 0xFB04F708: + strcpy(Toets,"Center");// optima Center toets + Ghost_Code=0x00FFCD32; + break; + case 0xE41BF708: // OFF key + strcpy(Toets,"OFF Key"); + Ghost_Code=0x00FFCD32; // // optima Power toets + break; + case 0xE51AF708: // C key + strcpy(Toets,"C Key"); + Ghost_Code=0x00FFCD32; // // optima enter toets + break; + case 0xE11EF708: // B key + strcpy(Toets,"A-Key"); + Ghost_Code=0x00FFCD32; // // optima Brightness toets + break; + case 0xE01FF708: // A key + strcpy(Toets,"A-Key"); + Ghost_Code=0x7788CD32; // // optima menu toets + break; + case 0x0: // Default na reset + strcpy(Toets,"Null code "); + Ghost_Code=0x7788CD32; // // optima menu toets + break; + + default: + Ghost_Code=NEC_Code; // Originele code behouden + break; + } + return(Ghost_Code); + +} +