Memory Keywords And Assignments/Type Conversions - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

C/C++ Compiler Language Extensions
Memory space specification keywords cannot qualify type names and
structure tags, but you can use them in pointer declarations. The follow-
ing listing shows examples of memory space specification keywords in
typedef and struct statements.
/* Dual Memory Support Keyword typedef & struct Examples */
typedef float pm * PFLOATP;
/* PFLOATP defines a type which is a pointer to a
/* float which resides in pm.
struct s {int x; int y; int z;};
static pm struct s mystruct={10,9,8};
/* Note that the pm specification is not used in
/* the structure definition. The pm specification
/* is used when defining the variable mystruct

Memory Keywords and Assignments/Type Conversions

Memory space specifications limit the kinds of assignments your program
can make:
• You may make assignments between variables allocated in different
memory spaces.
• Pointers to program memory must always point to
data memory must always point to
from different memory spaces within one expression. Do not
attempt to explicitly cast one type of pointer to another.
The following listings show a code segment with variables in different
memory spaces being assigned and a code segment with illegal mixing of
memory space assignments.
/* Legal Dual Memory Space Variable Assignment Example */
int pm x;
int dm y;
x = y;
/* Legal code */
/* Illegal Dual Memory Space Type Cast Example */
1-80
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
PM
. You may not mix addresses
DM
for ADSP-219x DSPs
*/
*/
*/
*/
*/
. Pointers to

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents