-t55xx_conf_block_t config = { .modulation = DEMOD_ASK, .inverted = FALSE, .offset = 0x00, .block0 = 0x00, .Q5 = FALSE };\r
+t55xx_conf_block_t config = { .modulation = DEMOD_ASK, .inverted = false, .offset = 0x00, .block0 = 0x00, .Q5 = false };\r
uint8_t bitRate = 0;\r
uint8_t rates[9] = {8,16,32,40,50,64,100,128,0};\r
uint8_t cmdp = 0;\r
uint8_t bitRate = 0;\r
uint8_t rates[9] = {8,16,32,40,50,64,100,128,0};\r
uint8_t cmdp = 0;\r
while(param_getchar(Cmd, cmdp) != 0x00 && !errors)\r
{\r
tmp = param_getchar(Cmd, cmdp);\r
while(param_getchar(Cmd, cmdp) != 0x00 && !errors)\r
{\r
tmp = param_getchar(Cmd, cmdp);\r
switch( config.modulation ){\r
case DEMOD_FSK:\r
snprintf(cmdStr, sizeof(buf),"%d %d", bitRate[config.bitrate], config.inverted );\r
switch( config.modulation ){\r
case DEMOD_FSK:\r
snprintf(cmdStr, sizeof(buf),"%d %d", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_FSK1:\r
case DEMOD_FSK1a:\r
snprintf(cmdStr, sizeof(buf),"%d %d 8 5", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_FSK1:\r
case DEMOD_FSK1a:\r
snprintf(cmdStr, sizeof(buf),"%d %d 8 5", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_FSK2:\r
case DEMOD_FSK2a:\r
snprintf(cmdStr, sizeof(buf),"%d %d 10 8", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_FSK2:\r
case DEMOD_FSK2a:\r
snprintf(cmdStr, sizeof(buf),"%d %d 10 8", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_ASK:\r
snprintf(cmdStr, sizeof(buf),"%d %d 1", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_ASK:\r
snprintf(cmdStr, sizeof(buf),"%d %d 1", bitRate[config.bitrate], config.inverted );\r
- ans = ASKDemod_ext(cmdStr, FALSE, FALSE, 1, &ST);\r
+ ans = ASKDemod_ext(cmdStr, false, false, 1, &ST);\r
break;\r
case DEMOD_PSK1:\r
// skip first 160 samples to allow antenna to settle in (psk gets inverted occasionally otherwise)\r
save_restoreGB(1);\r
CmdLtrim("160");\r
snprintf(cmdStr, sizeof(buf),"%d %d 6", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_PSK1:\r
// skip first 160 samples to allow antenna to settle in (psk gets inverted occasionally otherwise)\r
save_restoreGB(1);\r
CmdLtrim("160");\r
snprintf(cmdStr, sizeof(buf),"%d %d 6", bitRate[config.bitrate], config.inverted );\r
save_restoreGB(1);\r
CmdLtrim("160");\r
snprintf(cmdStr, sizeof(buf),"%d 0 6", bitRate[config.bitrate] );\r
save_restoreGB(1);\r
CmdLtrim("160");\r
snprintf(cmdStr, sizeof(buf),"%d 0 6", bitRate[config.bitrate] );\r
psk1TOpsk2(DemodBuffer, DemodBufferLen);\r
//undo trim samples\r
save_restoreGB(0);\r
break;\r
case DEMOD_NRZ:\r
snprintf(cmdStr, sizeof(buf),"%d %d 1", bitRate[config.bitrate], config.inverted );\r
psk1TOpsk2(DemodBuffer, DemodBufferLen);\r
//undo trim samples\r
save_restoreGB(0);\r
break;\r
case DEMOD_NRZ:\r
snprintf(cmdStr, sizeof(buf),"%d %d 1", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_BI:\r
case DEMOD_BIa:\r
snprintf(cmdStr, sizeof(buf),"0 %d %d 1", bitRate[config.bitrate], config.inverted );\r
break;\r
case DEMOD_BI:\r
case DEMOD_BIa:\r
snprintf(cmdStr, sizeof(buf),"0 %d %d 1", bitRate[config.bitrate], config.inverted );\r
- return (bool) ASKDemod("64 0 1", FALSE, FALSE, 1);\r
+ return (bool) ASKDemod("64 0 1", false, false, 1);\r
case 'p':\r
case 'P':\r
password = param_get32ex(Cmd, cmdp+1, 0, 16);\r
case 'p':\r
case 'P':\r
password = param_get32ex(Cmd, cmdp+1, 0, 16);\r
t55xx_conf_block_t tests[15];\r
int bitRate=0;\r
uint8_t fc1 = 0, fc2 = 0, clk=0;\r
t55xx_conf_block_t tests[15];\r
int bitRate=0;\r
uint8_t fc1 = 0, fc2 = 0, clk=0;\r
- if (GetFskClock("", FALSE, FALSE)){ \r
- fskClocks(&fc1, &fc2, &clk, FALSE);\r
- if ( FSKrawDemod("0 0", FALSE) && test(DEMOD_FSK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ if (GetFskClock("", false, false)){ \r
+ fskClocks(&fc1, &fc2, &clk, false);\r
+ if ( FSKrawDemod("0 0", false) && test(DEMOD_FSK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
tests[hits].modulation = DEMOD_FSK;\r
if (fc1==8 && fc2 == 5)\r
tests[hits].modulation = DEMOD_FSK1a;\r
else if (fc1==10 && fc2 == 8)\r
tests[hits].modulation = DEMOD_FSK2;\r
tests[hits].bitrate = bitRate;\r
tests[hits].modulation = DEMOD_FSK;\r
if (fc1==8 && fc2 == 5)\r
tests[hits].modulation = DEMOD_FSK1a;\r
else if (fc1==10 && fc2 == 8)\r
tests[hits].modulation = DEMOD_FSK2;\r
tests[hits].bitrate = bitRate;\r
- if ( FSKrawDemod("0 1", FALSE) && test(DEMOD_FSK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ if ( FSKrawDemod("0 1", false) && test(DEMOD_FSK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
tests[hits].modulation = DEMOD_FSK;\r
if (fc1 == 8 && fc2 == 5)\r
tests[hits].modulation = DEMOD_FSK1;\r
else if (fc1 == 10 && fc2 == 8)\r
tests[hits].modulation = DEMOD_FSK2a;\r
tests[hits].bitrate = bitRate;\r
tests[hits].modulation = DEMOD_FSK;\r
if (fc1 == 8 && fc2 == 5)\r
tests[hits].modulation = DEMOD_FSK1;\r
else if (fc1 == 10 && fc2 == 8)\r
tests[hits].modulation = DEMOD_FSK2a;\r
tests[hits].bitrate = bitRate;\r
- tests[hits].ST = TRUE;\r
- if ( ASKDemod_ext("0 0 1", FALSE, FALSE, 1, &tests[hits].ST) && test(DEMOD_ASK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ tests[hits].ST = true;\r
+ if ( ASKDemod_ext("0 0 1", false, false, 1, &tests[hits].ST) && test(DEMOD_ASK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
- tests[hits].ST = TRUE;\r
- if ( ASKDemod_ext("0 1 1", FALSE, FALSE, 1, &tests[hits].ST) && test(DEMOD_ASK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ tests[hits].ST = true;\r
+ if ( ASKDemod_ext("0 1 1", false, false, 1, &tests[hits].ST) && test(DEMOD_ASK, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
- if ( ASKbiphaseDemod("0 0 0 2", FALSE) && test(DEMOD_BI, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5) ) {\r
+ if ( ASKbiphaseDemod("0 0 0 2", false) && test(DEMOD_BI, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5) ) {\r
- if ( ASKbiphaseDemod("0 0 1 2", FALSE) && test(DEMOD_BIa, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5) ) {\r
+ if ( ASKbiphaseDemod("0 0 1 2", false) && test(DEMOD_BIa, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5) ) {\r
- if ( NRZrawDemod("0 0 1", FALSE) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ if ( NRZrawDemod("0 0 1", false) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
- if ( NRZrawDemod("0 1 1", FALSE) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ if ( NRZrawDemod("0 1 1", false) && test(DEMOD_NRZ, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
- if ( PSKDemod("0 0 6", FALSE) && test(DEMOD_PSK1, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ if ( PSKDemod("0 0 6", false) && test(DEMOD_PSK1, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
- if ( PSKDemod("0 1 6", FALSE) && test(DEMOD_PSK1, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
+ if ( PSKDemod("0 1 6", false) && test(DEMOD_PSK1, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)) {\r
psk1TOpsk2(DemodBuffer, DemodBufferLen);\r
if (test(DEMOD_PSK2, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)){\r
tests[hits].modulation = DEMOD_PSK2;\r
tests[hits].bitrate = bitRate;\r
psk1TOpsk2(DemodBuffer, DemodBufferLen);\r
if (test(DEMOD_PSK2, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)){\r
tests[hits].modulation = DEMOD_PSK2;\r
tests[hits].bitrate = bitRate;\r
psk1TOpsk2(DemodBuffer, DemodBufferLen);\r
if (test(DEMOD_PSK3, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)){\r
tests[hits].modulation = DEMOD_PSK3;\r
tests[hits].bitrate = bitRate;\r
psk1TOpsk2(DemodBuffer, DemodBufferLen);\r
if (test(DEMOD_PSK3, &tests[hits].offset, &bitRate, clk, &tests[hits].Q5)){\r
tests[hits].modulation = DEMOD_PSK3;\r
tests[hits].bitrate = bitRate;\r
config.Q5 = tests[0].Q5;\r
config.ST = tests[0].ST;\r
printConfiguration( config );\r
config.Q5 = tests[0].Q5;\r
config.ST = tests[0].ST;\r
printConfiguration( config );\r
\r
bool testQ5(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk){\r
\r
\r
bool testQ5(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk){\r
\r
\r
bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5){\r
\r
\r
bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5){\r
\r
}\r
if (testQ5(mode, offset, fndBitRate, clk)) {\r
}\r
if (testQ5(mode, offset, fndBitRate, clk)) {\r
- if ( !AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, TRUE, testpwd)) {\r
+ if ( !AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, testpwd)) {\r
- if (!AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, TRUE, i)) {\r
+ if (!AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, i)) {\r