NULL
This commit is contained in:
41
user/Device/CAT5171.c
Executable file
41
user/Device/CAT5171.c
Executable file
@@ -0,0 +1,41 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
|
||||
//##############################################################################
|
||||
#if(ENABLE_USE_CAT5171)
|
||||
//##############################################################################
|
||||
//==============================================================================
|
||||
void DigitalPotOutput(u16 PotCHN, u16 PotData) //
|
||||
{
|
||||
SI2C_Start();
|
||||
SI2C_Write(WR | CAT5171_ADDR | PotCHN );
|
||||
SI2C_Write(0);
|
||||
SI2C_Write(PotData);
|
||||
SI2C_Stop();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
u8 ReadDigitalPotWiper(u16 PotCHN)
|
||||
{
|
||||
u8 PotData;
|
||||
|
||||
SI2C_Start();
|
||||
SI2C_Write(RD | CAT5171_ADDR | PotCHN);
|
||||
PotData = SI2C_Read();
|
||||
SI2C_Stop();
|
||||
|
||||
return PotData;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void DigitalPotLowPower(u16 PotCHN)
|
||||
{
|
||||
// u8 Pot[2];
|
||||
//
|
||||
// Pot[0] = SHOT_DOWN;
|
||||
// Pot[1] = 0;
|
||||
// I2C_Master_Transmit(CAT5171_ADDR | PotCHN, &Pot[0], I2C_MEMADD_SIZE_16BIT);
|
||||
}
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
Reference in New Issue
Block a user