summaryrefslogtreecommitdiffstats
path: root/api/standard.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/standard.c')
-rw-r--r--api/standard.c90
1 files changed, 41 insertions, 49 deletions
diff --git a/api/standard.c b/api/standard.c
index bcbe2fc..c677234 100644
--- a/api/standard.c
+++ b/api/standard.c
@@ -1,8 +1,6 @@
#include "standard.h"
#include "cmd.h"
#include "user.h"
-
-
#include "firmware.h"
#ifndef Firmware_FORMAT_VER1
@@ -108,7 +106,7 @@ Dword Standard_getDriver (
/** Close the key */
RegCloseKey(hKey);
-exit :
+exit:
*handle = CreateFile (name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
return (error);
@@ -231,7 +229,7 @@ Dword Standard_computeFcw (
*fcw = controlWord & 0x7FFFFF;
-exit :
+exit:
return (error);
}
@@ -269,7 +267,7 @@ Dword Standard_programFcw (
error = Standard_writeRegister (demodulator, chip, Processor_OFDM, p_reg_bfs_fcw_22_16, temp2);
if (error) goto exit;
-exit :
+exit:
return (error);
}
@@ -295,7 +293,7 @@ Dword Standard_maskDcaOutput (
User_delay (demodulator, 5);
}
-exit :
+exit:
return (error);
}
@@ -935,7 +933,7 @@ Dword Standard_selectBandwidth (
error = Standard_writeRegisters (demodulator, chip, Processor_OFDM, cfoe_NS_2048_coeff1_25_24, 36, buffer);
if (error) goto exit;
-exit :
+exit:
return (error);
}
@@ -996,7 +994,7 @@ Dword Standard_setFrequency (
ganymede->frequency[chip] = frequency;
-exit :
+exit:
return (error);
}
@@ -1077,7 +1075,7 @@ Dword Standard_loadFirmware (
if (version == 0)
error = Error_BOOT_FAIL;
-exit :
+exit:
return (error);
}
@@ -1190,7 +1188,7 @@ Dword Standard_loadScript (
if (error) goto exit;
}
-exit :
+exit:
return (error);
}
@@ -1737,7 +1735,7 @@ Dword Standard_readRegisterBits (
#endif
-exit :
+exit:
return (error);
}
@@ -1761,7 +1759,7 @@ Dword Standard_getHardwareVersion (
/** HW Version = HWVer + Top_Ver */
*version = (Dword) (hwVer1 << 8) + (Dword) hwVer0;
-exit :
+exit:
#endif
return (error);
@@ -1826,7 +1824,7 @@ Dword Standard_getFirmwareVersion (
if (error == 0x01000009) { /* Boot code*/
readBuffer[0] = readBuffer[1] = readBuffer[2] = readBuffer[3] = 0;
error = 0;
- } else if (error = 0x010000FA) { /* Firmware code*/
+ } else if (error == 0x010000FA) { /* Firmware code*/
if (processor == Processor_LINK)
{
error = Standard_readRegisters (demodulator, 0, Processor_LINK, 0x83E9, 1, readBuffer);
@@ -1861,7 +1859,7 @@ Dword Standard_getFirmwareVersion (
*version = (Dword) (((Dword) readBuffer[0] << 24) + ((Dword) readBuffer[1] << 16) + ((Dword) readBuffer[2] << 8) + (Dword) readBuffer[3]);
-exit :
+exit:
#endif
return (error);
@@ -1911,7 +1909,7 @@ Dword Standard_getPostVitBer (
*postBitCount = bitCount * 204 * 8;
}
-exit :
+exit:
return (error);
}
@@ -1995,7 +1993,7 @@ Dword Standard_getSignalStrengthDbm (
*strengthDbm = (Long) (temp * -1);
-exit :
+exit:
return (error);
}
@@ -2025,7 +2023,7 @@ Dword Standard_loadIrTable (
}
}
-exit :
+exit:
return (error);
}
@@ -2352,7 +2350,7 @@ Dword Standard_isTpsLocked (
if (error) goto exit;
if (temp) *locked = True;
-exit :
+exit:
#endif
return (error);
@@ -2376,7 +2374,7 @@ Dword Standard_isMpeg2Locked (
if (error) goto exit;
if (temp) *locked = True;
-exit :
+exit:
#endif
return (error);
@@ -2427,10 +2425,7 @@ Dword Standard_isLocked (
}
#else
Ganymede* ganymede;
-
ganymede = (Ganymede*) demodulator;
-
-
*locked = False;
if (ganymede->architecture == Architecture_DCA) {
@@ -2517,7 +2512,7 @@ Dword Standard_isLocked (
ganymede->statistic[i].signalQuality = 0;
ganymede->statistic[i].signalStrength = 20;
}
-
+ return (error);
exit:
#endif
@@ -2571,7 +2566,7 @@ Dword Standard_reset (
if (error) goto exit;
}
-exit :
+exit:
#endif
return (error);
@@ -2662,7 +2657,7 @@ Dword Standard_getChannelModulation (
/** Get frequency */
channelModulation->frequency = ganymede->frequency[chip];
-exit :
+exit:
#endif
return (error);
@@ -2687,32 +2682,29 @@ Dword Standard_acquireChannel (
BOOL result;
AcquireChannelRequest request;
Ganymede* ganymede;
-
ganymede = (Ganymede*) demodulator;
-
if (ganymede->driver != NULL) {
request.chip = chip;
request.frequency = frequency;
request.bandwidth = bandwidth;
result = DeviceIoControl (
- ganymede->driver,
- IOCTL_AFA_DEMOD_ACQUIRECHANNEL,
- &request,
- sizeof (request),
- NULL,
- 0,
- &number,
- NULL
+ ganymede->driver,
+ IOCTL_AFA_DEMOD_ACQUIRECHANNEL,
+ &request,
+ sizeof (request),
+ NULL,
+ 0,
+ &number,
+ NULL
);
error = request.error;
} else {
error = Error_DRIVER_INVALID;
}
#else
- Ganymede* ganymede;
+ Ganymede* ganymede;
ganymede = (Ganymede*) demodulator;
-
if (ganymede->architecture == Architecture_DCA) {
begin = 0;
end = ganymede->chipNumber;
@@ -2737,7 +2729,7 @@ Dword Standard_acquireChannel (
if (error) goto exit;
}
-exit :
+exit:
#endif
return (error);
@@ -2775,7 +2767,6 @@ Dword Standard_setStreamType (
error = Error_DRIVER_INVALID;
}
#else
- Dword warning = Error_NO_ERROR;
Ganymede* ganymede;
Byte i;
@@ -2917,12 +2908,14 @@ Dword Standard_setStreamType (
}
}
break;
+ default:
+ break;
}
error = User_mpegConfig (demodulator);
ganymede->streamType = streamType;
-exit :
+exit:
#endif
return (error);
@@ -3441,7 +3434,7 @@ Dword Standard_getStatistic (
*statistic = ganymede->statistic[chip];
-exit :
+exit:
#endif
return (error);
@@ -3595,7 +3588,6 @@ Dword Standard_getDatagram (
Ganymede* ganymede;
Dword length = 0;
Byte value;
- Bool ready = False;
ganymede = (Ganymede*) demodulator;
@@ -3676,7 +3668,7 @@ Dword Standard_getIrCode (
*code = (Dword) ((readBuffer[0] << 24) + (readBuffer[1] << 16) + (readBuffer[2] << 8) + readBuffer[3]);
-exit :
+exit:
return (error);
}
@@ -3722,7 +3714,7 @@ Dword Standard_reboot (
ganymede->booted = False;
-exit :
+exit:
return (error);
}
@@ -3846,7 +3838,7 @@ Dword Standard_controlPowerSaving (
}
}
-exit :
+exit:
#endif
return (error);
@@ -3939,7 +3931,7 @@ Dword Standard_resetPidFilter (
error = Standard_writeRegisterBits (demodulator, chip, Processor_OFDM, p_mp2if_pid_rst, mp2if_pid_rst_pos, mp2if_pid_rst_len, 1);
if (error) goto exit;
-exit :
+exit:
#endif
return (error);
@@ -4001,7 +3993,7 @@ Dword Standard_addPidToFilter (
error = Standard_writeRegister (demodulator, chip, Processor_OFDM, p_mp2if_pid_index, index);
if (error) goto exit;
-exit :
+exit:
#endif
return (error);
@@ -4056,7 +4048,7 @@ Dword Standard_setBurstSize (
break;
}
-exit :
+exit:
return (error);
}
@@ -4088,6 +4080,6 @@ Dword Standard_getBurstSize (
}
}
-exit :
+exit:
return (error);
}