Hello Dries
Please help me.How do I convert “int Chip_I2D_GetValue()” to “**mA” ? What is the formula? for example ,how much mA when the value is 2570 . I used the code of "Therapy Adherence Demo Application" to init.
Best
Rex
/** * Starts an I2D conversion, waits for completion and returns the I2D value * @pre proper I2D mux should be set. * @return The I2D conversion result in native value (12bits). */
static int GetI2D(void)
{
Chip_I2D_Start(NSS_I2D);
while (!(Chip_I2D_ReadStatus(NSS_I2D) & I2D_STATUS_CONVERSION_DONE))
{
; /* Wait until the conversion is finished. */
}
return Chip_I2D_GetValue(NSS_I2D);
}