12345678910111213141516 |
- #include "i2c.h"
- #include "dac8571.h"
- void dac8571_set(unsigned int data, unsigned char a0){
- static unsigned char d[2];
- unsigned char addr = DAC8571_BASE_ADDR;
- if(a0)
- addr |= _BV(2);
-
- d[0] = data>>8;
- d[1] = data&0xff;
- i2cSend(DAC8571_CMD_WRITE_TEMP_AND_LOAD, 2, d, addr);
-
- }
|