dac8571.h 531 B

123456789101112131415161718192021
  1. #ifndef DAC8571_H
  2. #define DAC8571_H
  3. #include <avr/io.h>
  4. #define DAC8571_LOAD1 _BV(5)
  5. #define DAC8571_LOAD0 _BV(4)
  6. #define DAC8571_BRCSEL _BV(2)
  7. #define DAC8571_PD0 _BV(0)
  8. #define DAC8571_CMD_WRITE_TEMP_DATA 0
  9. #define DAC8571_CMD_WRITE_TEMP_PWDN (DAC8571_PD0)
  10. #define DAC8571_CMD_WRITE_TEMP_AND_LOAD (DAC8571_LOAD0)
  11. #define DAC8571_CMD_POWERDOWN (DAC8571_LOAD0 | DAC8571_PD0)
  12. #define DAC8571_CMD_UPDATE (DAC8571_LOAD1)
  13. #define DAC8571_BASE_ADDR 0b10011000
  14. void dac8571_set(unsigned int data, unsigned char a0);
  15. #endif