|
|||||||||||
|
Technical Support Support Resources
Product Information |
C166: USING SOF FOR PEC IN EMBEDDED C++Information in this article applies to:
QUESTIONWhile using the Embedded C++ compiler, if I initialize a PEC pointer using the _sof_ intrinsic function, I get the following error and warning messages:
unsigned int sdata samples[70];
SRCP0 = (unsigned int)&ADC_DAT;
warning 174: conversion from pointer to smaller integer
warning 174: integer conversion resulted in truncation
DSTP0 = _sof_(samples);
error 176: argument of type "unsigned int sdata
*" is incompatible with parameter of type "void huge *"
Is there a way to remove these error and warning messages? ANSWERYes, you may use type casts as shown below: SRCP0 = _sof_ ((void huge *) &ADC_DAT); DSTP0 = _sof_ ((void huge *) samples); MORE INFORMATION
Last Reviewed: Thursday, January 11, 2007 | ||||||||||
|
|||||||||||