Mercurial > public > ostc4
comparison Small_CPU/Inc/scheduler.h @ 209:2de856965c55
Merged in Ideenmodellierer/ostc4/ImprovmentSPI (pull request #9)
ImprovmentSPI
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Sun, 24 Mar 2019 22:09:37 +0000 |
parents | b95741467355 |
children | e524a824d8f2 |
comparison
equal
deleted
inserted
replaced
200:7116c0ffb862 | 209:2de856965c55 |
---|---|
30 | 30 |
31 /* Types -------------------------------------------------------------*/ | 31 /* Types -------------------------------------------------------------*/ |
32 #define SENSOR_PRESSURE_ID 0 | 32 #define SENSOR_PRESSURE_ID 0 |
33 #define MAX_SENSORS 1 | 33 #define MAX_SENSORS 1 |
34 | 34 |
35 #define SPI_SYNC_METHOD_NONE (0u) | |
36 #define SPI_SYNC_METHOD_HARD (1u) /* Scheduler shall reset all counters to 0 */ | |
37 #define SPI_SYNC_METHOD_SOFT (2u) /* Scheduler shall reset adjust counters to 100ms SPI data exchange cycle */ | |
38 #define SPI_SYNC_METHOD_INVALID (4u) | |
39 | |
35 typedef struct | 40 typedef struct |
36 { | 41 { |
37 uint8_t mode; | 42 uint8_t mode; |
38 short conservatism; | 43 short conservatism; |
39 short repetitive_dive; | 44 short repetitive_dive; |
81 } SScheduleCtrl; | 86 } SScheduleCtrl; |
82 | 87 |
83 | 88 |
84 /* Variables ---------------------------------------------------------*/ | 89 /* Variables ---------------------------------------------------------*/ |
85 extern SGlobal global; | 90 extern SGlobal global; |
86 extern uint8_t dohardspisync; | |
87 | 91 |
88 | 92 |
89 /* Function prototypes -----------------------------------------------*/ | 93 /* Function prototypes -----------------------------------------------*/ |
90 | 94 |
91 void initGlobals(void); | 95 void initGlobals(void); |
99 void scheduleUpdateLifeData(int32_t asynchron_milliseconds_since_last); | 103 void scheduleUpdateLifeData(int32_t asynchron_milliseconds_since_last); |
100 void scheduleSpecial_Evaluate_DataSendToSlave(void); | 104 void scheduleSpecial_Evaluate_DataSendToSlave(void); |
101 void scheduleUpdateDeviceDataChargerFull(void); | 105 void scheduleUpdateDeviceDataChargerFull(void); |
102 void scheduleUpdateDeviceDataChargerCharging(void); | 106 void scheduleUpdateDeviceDataChargerCharging(void); |
103 | 107 |
108 void Scheduler_Request_sync_with_SPI(uint8_t SyncMethod); | |
109 void Scheduler_SyncToSPI(void); | |
110 | |
104 uint8_t scheduleSetButtonResponsiveness(void); | 111 uint8_t scheduleSetButtonResponsiveness(void); |
105 | 112 |
106 void copyBatteryData(void); | 113 void copyBatteryData(void); |
107 | 114 |
108 //void scheduleSurfaceMode_test(void); | 115 //void scheduleSurfaceMode_test(void); |