123
Fork of LG by
DeviceISACSPotentiometers.c@197:7a05523bf588, 2016-10-19 (annotated)
- Committer:
- Kovalev_D
- Date:
- Wed Oct 19 10:55:05 2016 +0000
- Revision:
- 197:7a05523bf588
- Parent:
- 183:c7a9c309086c
modul
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Diletant | 161:efd949e8d536 | 1 | #include "Device.h" |
Diletant | 161:efd949e8d536 | 2 | extern Device device; |
Diletant | 161:efd949e8d536 | 3 | |
Diletant | 167:bedc0a9d559a | 4 | void InitISACSPotentiometersDefaultSettings(void){ |
Diletant | 183:c7a9c309086c | 5 | device.isacs.potentiometers.settings.a = 255; |
Diletant | 183:c7a9c309086c | 6 | device.isacs.potentiometers.settings.b = 255; |
Diletant | 161:efd949e8d536 | 7 | } |
Diletant | 161:efd949e8d536 | 8 | |
Diletant | 167:bedc0a9d559a | 9 | void InitISACSPotentiometersState(void) { |
Diletant | 161:efd949e8d536 | 10 | device.isacs.potentiometers.state.a = device.isacs.potentiometers.settings.a; |
Diletant | 161:efd949e8d536 | 11 | device.isacs.potentiometers.state.b = device.isacs.potentiometers.settings.b; |
Diletant | 161:efd949e8d536 | 12 | } |
Diletant | 161:efd949e8d536 | 13 | |
Diletant | 167:bedc0a9d559a | 14 | void DeviceStartISACSPotentiometers(void) { |
Diletant | 167:bedc0a9d559a | 15 | DeviceISACSSetPotentiometers(); |
Diletant | 167:bedc0a9d559a | 16 | } |
Diletant | 167:bedc0a9d559a | 17 | |
Diletant | 161:efd949e8d536 | 18 | void DeviceISACSSetPotentiometers(void) { |
Diletant | 183:c7a9c309086c | 19 | device.controller.I2C.state.buffer[2] = 255 - device.isacs.potentiometers.state.a; |
Diletant | 183:c7a9c309086c | 20 | device.controller.I2C.state.buffer[5] = 255 - device.isacs.potentiometers.state.b; |
Diletant | 183:c7a9c309086c | 21 | i2cEnableTransmission(); |
Diletant | 161:efd949e8d536 | 22 | } |