Demo entry 6659587

s

   

Submitted by anonymous on Nov 11, 2017 at 15:10
Language: C. Code size: 463 Bytes.

int MAX4397_Write_Byte(int index, unsigned char value)
{
	NEXUS_PlatformConfiguration *pConfig;

	if (index < 0 || index > 0x0d)
		return -1;

	if (!_max4397_valid[index])
		return -2;

	_max4397.byte[index] = value;

	pConfig = &g_NEXUS_platformConfig;

	avsret = NEXUS_I2c_Write(pConfig->i2c[1], _MAX4397_I2C, index, &_max4397.byte[index], 1);
	/*printf("MAX4397 write %02x %02x ==> %x\n", index, _max4397.byte[index], avsret);*/
	return 0;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).