| 12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef POTENTIOMETER_H
- #define POTENTIOMETER_H
- #include "pci.h"
- #define TPL0202_CMD_BITP 12
- #define TPL0202_CMD_BITM (0x3 << TPL0202_CMD_BITP)
- #define TPL0202_CMD_WR_WIPER_REG_ENUM 0x0
- #define TPL0202_CMD_WR_NV_REG_ENUM 0x1
- #define TPL0202_CMD_COPY_WIPER_TO_NV_ENUM 0x2
- #define TPL0202_CMD_COPY_NV_TO_WIPER_ENUM 0x3
- #define TPL0202_ADR_BITP 8
- #define TPL0202_ADR_BITM (0x3<<TPL0202_ADR_BITP)
- #define TPL0202_ADR_A_ENUM 0x1
- #define TPL0202_ADR_B_ENUM 0x2
- #define TPL0202_ADR_AB_ENUM 0x3
- #define TPL0202_DATA_BITP 0
- #define TPL0202_DATA_BITM (0xFF<<TPL0202_DATA_BITP)
- #define FILE_ROWS 12
- extern uint32_t pot_array [2];
- extern uint32_t pot_ch_a_file;
- extern uint32_t pot_ch_b_file;
- void potentiometer_set(reg_addr_pci* pci_bar_1, uint8_t pot_val_ch_a, uint8_t pot_val_ch_b);
- void potentiometer_set_qspi(uint8_t pot_offset, uint8_t pot_slope);
- void potentiometer_set_offset(reg_addr_pci* pci_bar_1, uint8_t pot_offset);
- void potentiometer_set_slope(reg_addr_pci* pci_bar_1, uint8_t pot_slope);
- void read_pot_file (const char* filename);
- void set_pot_values(double freq);
- #endif //POTENTIOMETER_H
|