From 6c52d763eb9f6887ce7d09bb3b5913c80a816674 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 16 Jan 2007 04:35:14 +0000 Subject: const-ify the parts of the API that deal with firmware image blobs git-svn-id: http://svn.asterisk.org/svn/octasic_api/oct612x/trunk@16 537310ab-6354-42db-a3cc-247b777f7be6 --- software/include/oct6100api/oct6100_apiud.h | 2 +- software/include/oct6100api/oct6100_chip_open_inst.h | 2 +- software/include/oct6100api/oct6100_chip_open_pub.h | 2 +- .../octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c | 10 +++++----- .../oct6100api/oct6100_api/oct6100_miscellaneous.c | 12 ++++++------ .../octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h | 10 +++++----- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/software/include/oct6100api/oct6100_apiud.h b/software/include/oct6100api/oct6100_apiud.h index 0b1b86e..2e1ece7 100644 --- a/software/include/oct6100api/oct6100_apiud.h +++ b/software/include/oct6100api/oct6100_apiud.h @@ -253,7 +253,7 @@ UINT32 Oct6100UserMemSet( UINT32 Oct6100UserMemCopy( IN PVOID f_pDestination, - IN PVOID f_pSource, + IN const void *f_pSource, IN UINT32 f_ulLength ); /* Serialization functions. */ diff --git a/software/include/oct6100api/oct6100_chip_open_inst.h b/software/include/oct6100api/oct6100_chip_open_inst.h index 49ba6d6..2017ca6 100644 --- a/software/include/oct6100api/oct6100_chip_open_inst.h +++ b/software/include/oct6100api/oct6100_chip_open_inst.h @@ -45,7 +45,7 @@ typedef struct _OCT6100_API_CHIP_CONFIG_ UINT32 ulUserChipId; PVOID pProcessContext; - PUINT8 pbyImageFile; /* Byte pointer to the image file to be uploaded into the chip. */ + unsigned char const *pbyImageFile; /* Byte pointer to the image file to be uploaded into the chip. */ UINT32 ulImageSize; /* Size of the image file (in bytes). */ UINT32 ulMemClkFreq; diff --git a/software/include/oct6100api/oct6100_chip_open_pub.h b/software/include/oct6100api/oct6100_chip_open_pub.h index 2dbe988..90ad6d1 100644 --- a/software/include/oct6100api/oct6100_chip_open_pub.h +++ b/software/include/oct6100api/oct6100_chip_open_pub.h @@ -50,7 +50,7 @@ typedef struct _OCT6100_CHIP_OPEN_ UINT32 ulMaxRwAccesses; - PUINT8 pbyImageFile; /* Byte pointer to the image file to be uploaded into the chip. */ + unsigned char const *pbyImageFile; /* Byte pointer to the image file to be uploaded into the chip. */ UINT32 ulImageSize; /* Size of the image file (in bytes). */ UINT32 ulMemClkFreq; /* 10 - 133.3 MHz. */ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c index 3a07704..54727d2 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c @@ -2686,7 +2686,7 @@ UINT32 Oct6100ApiLoadImage( UINT32 ulTempPtr; UINT32 ulNumWrites; PUINT16 pusSuperArray; - PUINT8 pbyImageFile; + unsigned char const *pbyImageFile; UINT32 ulByteCount = 0; UINT16 usReadData; UINT32 ulAddressOfst; @@ -4975,11 +4975,11 @@ UINT32 Oct6100ApiInitToneInfo( { UINT32 ulResult; - PUINT8 pszToneInfoStart = NULL; - PUINT8 pszToneInfoEnd = NULL; + unsigned char const *pszToneInfoStart = NULL; + unsigned char const *pszToneInfoEnd = NULL; - PUINT8 pszCurrentInfo; - PUINT8 pszNextInfo; + unsigned char const *pszCurrentInfo; + unsigned char const *pszNextInfo; UINT32 ulToneEventNumber; UINT32 ulTempValue; diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c index 6ace376..4028658 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c @@ -380,15 +380,15 @@ f_pszLastCharPtr Last character in the source string. \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ #if !SKIP_Oct6100ApiStrStr -PUINT8 Oct6100ApiStrStr( - IN PUINT8 f_pszSource, - IN PUINT8 f_pszString, - IN PUINT8 f_pszLastCharPtr ) +unsigned char const *Oct6100ApiStrStr( + IN unsigned char const *f_pszSource, + IN unsigned char const *f_pszString, + IN unsigned char const *f_pszLastCharPtr ) { UINT32 ulCurrentPos; UINT32 ulStringLength; UINT32 ulNumMatchingCharFound = 0; - PUINT8 pchFirstChar = NULL; + unsigned char const *pchFirstChar = NULL; UINT32 ulSourceLength; if ( f_pszLastCharPtr < f_pszSource ) @@ -453,7 +453,7 @@ f_pszString Source string to count length of. \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ #if !SKIP_Oct6100ApiStrLen UINT32 Oct6100ApiStrLen( - IN PUINT8 f_pszString ) + IN unsigned char const *f_pszString ) { UINT32 ulCount = 0; diff --git a/software/octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h b/software/octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h index a00e2a3..45c9fdd 100644 --- a/software/octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h +++ b/software/octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h @@ -410,13 +410,13 @@ VOID Oct6100ApiCreateFeatureMask( IN UINT32 f_ulFieldBitOffset, OUT PUINT32 f_pulFieldMask ); -PUINT8 Oct6100ApiStrStr( - IN PUINT8 f_pszSource, - IN PUINT8 f_pszString, - IN PUINT8 f_pszLastCharPtr ); +unsigned char const *Oct6100ApiStrStr( + IN unsigned char const *f_pszSource, + IN unsigned char const *f_pszString, + IN unsigned char const *f_pszLastCharPtr ); UINT32 Oct6100ApiStrLen( - IN PUINT8 f_pszString ); + IN unsigned char const *f_pszString ); UINT32 Oct6100ApiAsciiToHex( IN UINT8 f_chCharacter, -- cgit v1.2.3