cancel
Showing results for 
Search instead for 
Did you mean: 

EEPROM-24c16A

sriramdhivakar
Associate II

Hi @everyone

In the below IIC API 
HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)

uint16_t MemAddress will accept only hexadecimal value or it will accept decimal value also.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

The numbers are translated by the compiler anyway, which doesn't care whether you feed it decimal, hexadecimal, octal or binary numbers. However, hexadecimal numbers are often justified because they are easier to read.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Peter BENSCH
ST Employee

The numbers are translated by the compiler anyway, which doesn't care whether you feed it decimal, hexadecimal, octal or binary numbers. However, hexadecimal numbers are often justified because they are easier to read.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

An integer between 0-2047 decimal, or 0-0x7FF hex. It can be a variable, you can do math on the parameter.

#LearnC

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi @Peter BENSCH 

Thank you for valuable reply.

Hi @Tesla DeLorean 

Thank you for your valuable reply