I have an API that implements a writing operation to EEPROM. Here is its declaration:
CYBLE_API_RESULT_T CyBle_StoreAppData (uint8 * srcBuff, const uint8 destAddr[], uint32 buffLen, uint8 isForceWrite);
It is working well when I call this function and send an array parameter to srcBuff
which has been declared as uint8
type.
The problem is, I need to send char
array pointer to it. I was thinking that char
is already a uint8
, but I get a compiler warning if I send a char
array pointer to that function instead of uint8
. Why can't I use char
instead of uint8
? Here are 2 examples of calling that function:
static const uint8 datastack_ROM[dedicatedRomSize] = {0};
uint8 Container_ID[10];
char Prefix[10];
//Call the function with Container_ID which has been declared as uint8. This is working.
CyBle_StoreAppData(Container_ID,datastack_ROM,10,0);
//Call the function with Prefix which has been declared as char. This is NOT working.
CyBle_StoreAppData(Prefix,datastack_ROM,10,0);
Here is the warning for the second call:
passing char[10] to parameter of type 'uint8 *' converts between pointers to integer types with different sign.
Aren't char
and uint8
same?