annotate Small_CPU/Inc/pressure.h @ 220:e524a824d8f2 Improve_IPC_Sync

Added schedule point for functions executed once in a second SPI communication takes place every 100ms triggered by the master (main). Synchronisation is done using the SPI RX complete callback which is called ~4ms after communication was started. In the previous implementation this could happen in parallel to usage of data. To solve this potential problem the execution of functions called once a second was moved from 1000ms to 980ms giving a 20ms window for execution.
author ideenmodellierer
date Sun, 31 Mar 2019 15:49:47 +0200
parents 5f11787b4f42
children 8e9c502c0b06
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 #ifndef PRESSURE_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 #define PRESSURE_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 #include <stdint.h>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 uint8_t init_pressure(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 uint8_t pressure_update(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 uint8_t is_init_pressure_done(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 void pressure_sensor_get_pressure_raw(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 void pressure_sensor_get_temperature_raw(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 void pressure_calculation(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 float get_temperature(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 float get_pressure_mbar(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 float get_surface_mbar(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 void init_surface_ring(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 void update_surface_pressure(uint8_t call_rhythm_seconds);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 uint32_t demo_modify_temperature_and_pressure(int32_t divetime_in_seconds, uint8_t subseconds, float ceiling_mbar);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 #endif /* PRESSURE_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26