X-Git-Url: http://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=common%2FI2C%2FMAX1164x.c;fp=common%2FI2C%2FMAX1164x.c;h=404d82d9c47ba1c66c36b0bcce8238104cb761c5;hp=8160ac2e7ef9d330dacbcb56b4cd21c1503e7c19;hb=a6a04f58e4afd20f206fdf4a8a7b3ce4062f1b67;hpb=cd92472e6fd63693741f8e168123a4182802651b diff --git a/common/I2C/MAX1164x.c b/common/I2C/MAX1164x.c index 8160ac2..404d82d 100644 --- a/common/I2C/MAX1164x.c +++ b/common/I2C/MAX1164x.c @@ -1,55 +1,55 @@ -#define F_CPU 8000000UL -#include -#include -#include -#include -#include -#include "USI_TWI_Master.h" -#include "MAX1164x.h" - -void MAX1164x_init(){ - - -} -void MAX1164x_config(uint8_t setup,uint8_t config){ - I2c_StartCondition(); - I2c_WriteByte (0b01101100); - I2c_WriteByte (setup|0x80); - I2c_WriteByte (config); - I2c_StopCondition(); - -} -int16_t MAX1164x_read() { - uint16_t res; - I2c_StartCondition(); - I2c_WriteByte (0b01101101); - //DDR_USI&=~(1< +#include +#include +#include +#include +#include "USI_TWI_Master.h" +#include "MAX1164x.h" + +void MAX1164x_init(){ + + +} +void MAX1164x_config(uint8_t setup,uint8_t config){ + I2c_StartCondition(); + I2c_WriteByte (0b01101100); + I2c_WriteByte (setup|0x80); + I2c_WriteByte (config); + I2c_StopCondition(); + +} +int16_t MAX1164x_read(void) { + uint16_t res; + I2c_StartCondition(); + I2c_WriteByte (0b01101101); + //DDR_USI&=~(1<