annotate src/i2c.inc @ 654:75e90cd0c2c3

hwOS sport 10.77 release
author heinrichsweikamp
date Thu, 14 Mar 2024 16:56:46 +0100
parents 7d8a4c60ec1a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
3 ; File i2c.inc combined next generation V3.08.8
0
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ;
654
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 643
diff changeset
6 ; Copyright (c) 2011, JD Gascuel, heinrichs weikamp gmbh, all right reserved.
0
heinrichsweikamp
parents:
diff changeset
7 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
8 ; HISTORY
heinrichsweikamp
parents:
diff changeset
9 ; 2012-10-24 : [mH] Creation
heinrichsweikamp
parents:
diff changeset
10
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
11 extern I2C_RX_accelerometer
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
12 extern I2C_init_compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
13 extern I2C_sleep_compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
14
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
15 extern lt2942_init ; init gauge IC
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 631
diff changeset
16 extern lt2942_sleep ; sleep gauge IC
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
17 extern lt2942_get_status ; read gauge IC status
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
18 extern lt2942_get_voltage ; read battery voltage registers
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
19 extern lt2942_get_temperature ; read battery temperature
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
20 extern lt2942_get_accumulated_charge ; read battery gauge register
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
21 extern lt2942_charge_done ; set battery gauge register to fully charged
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
22
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
23 extern reset_battery_gauge_and_lt2942 ; reset battery registers and battery gauge chip
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
24 extern reset_battery_gauge ; reset battery registers only
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
25
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
26 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
27 extern I2C_probe_OSTC_rx ; set ostc_rx_present bit if present
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
28 extern I2C_get_tankdata ; get the tank data
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
29 ENDIF
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
30
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
31 IFDEF _rx_update
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
32 extern I2C_update_OSTC_rx ; load new firmware into RX processor
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 560
diff changeset
33 ENDIF
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
34
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
35 IFDEF _compass
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 615
diff changeset
36 extern I2C_RX_compass
643
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
37 ENDIF
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
38
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
39 extern I2C_probe_pressure_sensor ; Probe the type of sensor, set/clear press_sensor_type
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
40 extern I2C_get_calib_MS5837 ; Read C1 to C6
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
41 extern I2C_get_press_val_MS5837
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
42 extern I2C_get_temp_val_MS5837
7d8a4c60ec1a 3.15 release
heinrichsweikamp
parents: 640
diff changeset
43 extern check_i2c_error