12345678910111213141516171819202122232425262728293031323334 |
- /*
- * potentiometers.h
- *
- * Created: 04.07.2019 19:30:37
- * Author: Radioman
- */
- #ifndef POTENTIOMETERS_H_
- #define POTENTIOMETERS_H_
- #define ON 1
- #define OFF 0
- typedef enum { POT_SHIFT1, POT_GAIN1, POT_SHIFT2, POT_GAIN2, POT_DRIVE1, POT_DRIVE2 } potnum_t;
- typedef struct {
- uint8_t ch;
- float gain;
- float shift;
- float drive;
- } opamp_str;
- void POT_SendData(uint8_t data, potnum_t potnum);
- uint8_t SetOpampGain(uint8_t ch, float gain);
- uint8_t SetOpampShift(uint8_t ch, float shift);
- uint8_t SetDriveVoltage(uint8_t ch, float voltage);
- void SetInputRange(uint8_t ch, float vlow, float vhigh);
- void SetGainData(uint8_t ch, uint8_t data);
- void SetShiftData(uint8_t ch, uint8_t data);
- void SetDriveData(uint8_t ch, uint8_t data);
- void SwitchDrive(uint8_t ch, uint8_t onoff);
- void RestoreGainShift(uint8_t ch);
- #endif /* POTENTIOMETERS_H_ */
|