0
|
1 ;=============================================================================
|
|
2 ;
|
631
|
3 ; File i2c.inc combined next generation V3.08.8
|
0
|
4 ;
|
|
5 ;
|
654
|
6 ; Copyright (c) 2011, JD Gascuel, heinrichs weikamp gmbh, all right reserved.
|
0
|
7 ;=============================================================================
|
|
8 ; HISTORY
|
|
9 ; 2012-10-24 : [mH] Creation
|
|
10
|
604
|
11 extern I2C_RX_accelerometer
|
|
12 extern I2C_init_compass
|
|
13 extern I2C_sleep_compass
|
623
|
14
|
|
15 extern lt2942_init ; init gauge IC
|
640
|
16 extern lt2942_sleep ; sleep gauge IC
|
623
|
17 extern lt2942_get_status ; read gauge IC status
|
604
|
18 extern lt2942_get_voltage ; read battery voltage registers
|
623
|
19 extern lt2942_get_temperature ; read battery temperature
|
|
20 extern lt2942_get_accumulated_charge ; read battery gauge register
|
|
21 extern lt2942_charge_done ; set battery gauge register to fully charged
|
604
|
22
|
631
|
23 extern reset_battery_gauge_and_lt2942 ; reset battery registers and battery gauge chip
|
|
24 extern reset_battery_gauge ; reset battery registers only
|
|
25
|
604
|
26 IFDEF _rx_functions
|
|
27 extern I2C_probe_OSTC_rx ; set ostc_rx_present bit if present
|
|
28 extern I2C_get_tankdata ; get the tank data
|
628
|
29 ENDIF
|
|
30
|
|
31 IFDEF _rx_update
|
604
|
32 extern I2C_update_OSTC_rx ; load new firmware into RX processor
|
|
33 ENDIF
|
623
|
34
|
|
35 IFDEF _compass
|
|
36 extern I2C_RX_compass
|
643
|
37 ENDIF
|
|
38
|
|
39 extern I2C_probe_pressure_sensor ; Probe the type of sensor, set/clear press_sensor_type
|
|
40 extern I2C_get_calib_MS5837 ; Read C1 to C6
|
|
41 extern I2C_get_press_val_MS5837
|
|
42 extern I2C_get_temp_val_MS5837
|
|
43 extern check_i2c_error |