Mercurial > public > ostc4
comparison Small_CPU/Src/scheduler.c @ 231:f6961efb3794 div-fixes-4-1
cleanup: do not re-implement a standard function
I was triggered by a spelling error, but why implement a
function that is standard? Again: trivial cleanup.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Wed, 03 Apr 2019 14:33:12 +0200 |
parents | 3973208c4a20 |
children | 625d20070261 |
comparison
equal
deleted
inserted
replaced
230:3973208c4a20 | 231:f6961efb3794 |
---|---|
72 | 72 |
73 /* Private function prototypes -----------------------------------------------*/ | 73 /* Private function prototypes -----------------------------------------------*/ |
74 | 74 |
75 _Bool vpm_crush2(void); | 75 _Bool vpm_crush2(void); |
76 void scheduleUpdateDeviceData(void); | 76 void scheduleUpdateDeviceData(void); |
77 void initStructWithZeero(uint8_t* data, uint16_t length); | |
78 long get_nofly_time_minutes(void); | 77 long get_nofly_time_minutes(void); |
79 void copyActualGas(SGas gas); | 78 void copyActualGas(SGas gas); |
80 void copyPressureData(void); | 79 void copyPressureData(void); |
81 void copyCnsAndOtuData(void); | 80 void copyCnsAndOtuData(void); |
82 void copyTimeData(void); | 81 void copyTimeData(void); |
96 extern void SPI_Evaluate_RX_Data(); | 95 extern void SPI_Evaluate_RX_Data(); |
97 /* Exported functions --------------------------------------------------------*/ | 96 /* Exported functions --------------------------------------------------------*/ |
98 | 97 |
99 void initGlobals(void) | 98 void initGlobals(void) |
100 { | 99 { |
101 initStructWithZeero((uint8_t*) &global, sizeof(SGlobal)); | 100 bzero(&global, sizeof(SGlobal)); |
102 | 101 |
103 global.dataSendToSlavePending = 0; | 102 global.dataSendToSlavePending = 0; |
104 global.dataSendToSlaveIsValid = 1; | 103 global.dataSendToSlaveIsValid = 1; |
105 global.dataSendToSlaveIsNotValidCount = 0; | 104 global.dataSendToSlaveIsNotValidCount = 0; |
106 | 105 |
1299 return 1; | 1298 return 1; |
1300 } | 1299 } |
1301 | 1300 |
1302 } | 1301 } |
1303 return 0; | 1302 return 0; |
1304 }; | |
1305 | |
1306 | |
1307 void initStructWithZeero(uint8_t* data, uint16_t length) | |
1308 { | |
1309 for(uint16_t i = 0; i < length; i++) | |
1310 data[i] = 0; | |
1311 } | 1303 } |
1312 | 1304 |
1313 | 1305 |
1314 long get_nofly_time_minutes(void) | 1306 long get_nofly_time_minutes(void) |
1315 { | 1307 { |