summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2007-01-16 04:35:14 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-02-27 21:09:14 +0200
commit6c52d763eb9f6887ce7d09bb3b5913c80a816674 (patch)
tree55a720439ba8dda6fc68b2f4c020c41bd749eceb
parentd29126d9147c0a40635028372b4bbd7e66e40803 (diff)
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
-rw-r--r--software/include/oct6100api/oct6100_apiud.h2
-rw-r--r--software/include/oct6100api/oct6100_chip_open_inst.h2
-rw-r--r--software/include/oct6100api/oct6100_chip_open_pub.h2
-rw-r--r--software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c10
-rw-r--r--software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c12
-rw-r--r--software/octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h10
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,