void fun(char*);
int main()
{
const char* a="";
fun(a);
while(1) {}
return 0;
}
Message Edited by jballes on 2007-04-0204:26 PM
typedef struct {
unsigned long FirstCluster;
unsigned long FilePos;
unsigned long size;
signed short Error;
unsigned char InUse;
unsigned char AccessFlags;
union {
struct {
int first;
int second;
int third;
} Fat;
} Data;
} FS_FILE;
int a (
struct {
int val1;
int val2;
} *p
)
{
}
int b( struct {
int val1bis;
int val2bis;
} *pbis
)
{
a(pbis); /* Error " illegal implicit conversion from 'struct *' to 'struct *' " */
}
int c ( union {
struct {
int first;
int second;
int third;
} Fat;
} *mem)
{
}
int d (FS_FILE *file)
{
c(&(file->Data)); /* Error " illegal implicit conversion from 'union *' to 'union *' " */
}Message Edited by jballes on 2007-04-0309:35 AM
Can you please tell me how to do it?
void ProcessCAN(void)
{
can_msg_struct msgCanRX;
if (CanRxMbFull(0) == 1) /* Check if CAN message received */
{
msgCanRX = CanRxMsg(0); // Receive CAN message
UartTxMsg((unsigned char *)msgCanRX.data[0], 1);// print received data byte in serial monitor
}
}
All I want is to display received CAN data in serial terminal , I use mpc5606b startertrak dev kit and code warrior. I get garbage vales when I use this method to display values. Is this related to data type issue?
void UartTxMsg(uint8_t *u8TxData, uint32_t u32Size)
As UART transmitter considers its data to be in uint8_t , but my CAN data is unsigned char
Thank you