minor type corrections

This commit is contained in:
sezero
2018-08-07 10:37:24 +03:00
parent d46910aa23
commit 032b25b708
3 changed files with 6 additions and 7 deletions

View File

@@ -91,12 +91,12 @@ sst1InitComputeClkParamsATT_Int(FFLOAT dwFreq, sst1ClkTimingStruct *clkTiming)
lBestErr = 99999999;
sNBest = 0;
sMBest = 0;
lRatio = (unsigned int)((dwFreq*10l)/(FI/100l)) * lPDiv; // lRatio in [1/1000]
lRatio = (FxU32)((dwFreq*10l)/(FI/100l)) * lPDiv; // lRatio in [1/1000]
for ( sN= (NMID-NDELTA); sN <= (NMID+NDELTA); sN++ ) {
sM = (unsigned short)((lRatio * sN + 500) / 1000l);
if (sM > MMAX) sM = MMAX;
lActual = (unsigned int)((FI * sM) / (sN * lPDiv));
lActual = (FxU32)((FI * sM) / (sN * lPDiv));
lError = (lActual > dwFreq) ? (lActual - dwFreq) : (dwFreq - lActual);
if ( lError < lBestErr ) {
sNBest = sN;
@@ -109,7 +109,7 @@ sst1InitComputeClkParamsATT_Int(FFLOAT dwFreq, sst1ClkTimingStruct *clkTiming)
sM++;
if (sM > MMAX) sM = MMAX;
lActual = (unsigned int)((FI * sM) / (sN * lPDiv));
lActual = (FxU32)((FI * sM) / (sN * lPDiv));
lError = (lActual > dwFreq) ? (lActual - dwFreq) : (dwFreq - lActual);
if ( lError < lBestErr) {
sNBest = sN;

View File

@@ -23,9 +23,8 @@
#define _CANOPUS_H_
// if we use FFLOAT as an integer, we need to handle clocks in Hz
#define CLOCK_MULTIPLIER 1000000L
typedef unsigned int FFLOAT;
/* HDG: unused: typedef unsigned int DDOUBLE; */
#define CLOCK_MULTIPLIER 1000000L
typedef FxU32 FFLOAT;
/* FixMe!! Is this right? */
#define CANOPUS_ID 0x10UL

View File

@@ -474,7 +474,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitResetTmus(FxU32 *sstbase)
// Fix problem where first Texture downloads to TMU weren't being
// received properly
ISET(*(int *) (0xf00000 + (long) sstbase), 0xdeadbeef);
ISET(*(FxI32 *) (0xf00000 + (long) sstbase), 0xdeadbeef);
sst1InitIdle(sstbase);
return(FXTRUE);