Hello Anthony:
I think this is a coding issue. In your code the compiler does not interpret the parameter __aai16_Buffer as a "2D array", but as a "pointer to pointer", which is not the same thing. Then you would need to cast the pointer back to 2D array type.
So the function definition should be something like this:
void vMyClass_MyFunction(int16_t** __aai16_Buffer,uint8_t __u8_BufferLength)
{
int16_t __i16_test;
uint16_t __u16_i;
for(__u16_i=0;__u16_i<__u8_BufferLength ;__u16_i++)
{
__i16_test= ((int16_t(*)[__u8_BufferLength])__aai16_Buffer)[0][__u16_i];
if(((int16_t(*)[__u8_BufferLength])__aai16_Buffer)[0][__u16_i]!=0 && ((int16_t(*)[__u8_BufferLength])__aai16_Buffer)[1][__u16_i]!=0)
{
// do something
}
}
}
or this:
void vMyClass_MyFunction(int16_t** __aai16_Buffer,uint8_t __u8_BufferLength)
{
int16_t __i16_test;
uint16_t __u16_i;
for(__u16_i=0;__u16_i<__u8_BufferLength ;__u16_i++)
{
__i16_test= (*((int16_t(*)[__u8_BufferLength])__aai16_Buffer+0))[__u16_i];
if( (*((int16_t(*)[__u8_BufferLength])__aai16_Buffer+0))[__u16_i]!=0 && (*((int16_t(*)[__u8_BufferLength])__aai16_Buffer+1))[__u16_i]!=0)
{
// do something
}
}
}
And even simpler if you use the correct parameter type instead of int16_t**, although this requires a fixed array size:
void vMyClass_MyFunction(int16_t __aai16_Buffer[][100],uint8_t __u8_BufferLength)
{
int16_t __i16_test;
uint16_t __u16_i;
for(__u16_i=0;__u16_i<__u8_BufferLength ;__u16_i++)
{
__i16_test= __aai16_Buffer[0][__u16_i];
if(__aai16_Buffer[0][__u16_i]!=0 && __aai16_Buffer[1][__u16_i]!=0)
{
break;
}
}
}
Regards!
Jorge Gonzalez