I'm working with an embedded system that transfers data over a 32-bit bus, so I have a variable defined as follows:
unsigned long UserData[4];
As you can tell, this would be 128-bits of data. After I get this data from the bus, I have a function that accepts 128-bits of data as an argument, but in the form of an unsigned character array as follows;
unsigned char FuncData[16];
// Both arguments are defined in the prototype as unsigned char's
RandomFunction(FuncData, UserData);
From looking at the above function, I want to input this UserData into the function - what would be the best way to typecast or convert this unsigned long array to an unsigned character array?
Thanks for the help, I greatly appreciate it!