potentiometer.h 835 B

1234567891011121314151617181920212223
  1. #include "tmsgheaders.h"
  2. #define TPL0202_CMD_BITP 12
  3. #define TPL0202_CMD_BITM (0x3 << TPL0202_CMD_BITP)
  4. #define TPL0202_CMD_WR_WIPER_REG_ENUM 0x0
  5. #define TPL0202_CMD_WR_NV_REG_ENUM 0x1
  6. #define TPL0202_CMD_COPY_WIPER_TO_NV_ENUM 0x2
  7. #define TPL0202_CMD_COPY_NV_TO_WIPER_ENUM 0x3
  8. #define TPL0202_ADR_BITP 8
  9. #define TPL0202_ADR_BITM (0x3<<TPL0202_ADR_BITP)
  10. #define TPL0202_ADR_A_ENUM 0x1
  11. #define TPL0202_ADR_B_ENUM 0x2
  12. #define TPL0202_ADR_AB_ENUM 0x3
  13. #define TPL0202_DATA_BITP 0
  14. #define TPL0202_DATA_BITM (0xFF<<TPL0202_DATA_BITP)
  15. extern uint32_t pot_array [2];
  16. void potentiometer_set(void *bar1, uint8_t pot_val_ch_a, uint8_t pot_val_ch_b);
  17. void potentiometer_set_qspi(uint8_t pot_val_ch_a, uint8_t pot_val_ch_b );