Mercurial > public > ostc4
annotate Discovery/Src/gfx_fonts.c @ 240:625d20070261 div-fixes-5
Improvement SPI stability/recoverability
The core part of this commit comes from careful code reading. The core is the
swap of Scheduler_Request_sync_with_SPI(SPI_SYNC_METHOD_SOFT) and
SPI_Start_single_TxRx_with_Master(). This code is sitting in an if-clause
that is triggered on SPI comms failure. Instead of blindly trying to
communicate again (which will very likely fail again), first try to reset
the comms link, and then try to communicate again. That simply makes
more sense in this case.
This is heavily tested, on 2 simple dives, and 5 very long deco schedules
from the simulator (10+ hour deco's), and a lot of small simulated dives
(upto 2h runtime). Of all these tests, only one long session failed after
9 out of 11h runtime. Analyzing that one failure, suggests that the
RTE is looping in some error handler, which (obviously) results in
a SPI comms failure as a result. I consider this not part of this change.
Additionally, some more cleanup is done in this code.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Mon, 08 Apr 2019 11:49:13 +0200 |
parents | 5ca88855da87 |
children | 1c95f811967c |
rev | line source |
---|---|
38 | 1 /** |
2 ****************************************************************************** | |
3 * @file gfx_fonts.c | |
4 * @author heinrichs/weikamp, JD Gascuel | |
5 * @version V1.4.0 | |
6 * @date 17-Decembre-2017 | |
7 * @brief Font data (and images) stored in UPPER ROM. | |
8 * | |
9 ****************************************************************************** | |
10 * @attention | |
11 * | |
12 * <h2><center>© COPYRIGHT(c) 2017 heinrichs weikamp</center></h2> | |
13 * | |
14 ****************************************************************************** | |
15 */ | |
16 | |
17 /* Includes ------------------------------------------------------------------*/ | |
18 | |
19 #include "gfx_fonts.h" | |
20 | |
170
5ca88855da87
Fix accidentally pushed local code
Jan Mulder <jlmulder@xs4all.nl>
parents:
169
diff
changeset
|
21 #ifdef DEBUG |
38 | 22 # define INCLUDE_FONTS_BINARY |
170
5ca88855da87
Fix accidentally pushed local code
Jan Mulder <jlmulder@xs4all.nl>
parents:
169
diff
changeset
|
23 #endif |
38 | 24 |
25 #ifdef INCLUDE_FONTS_BINARY | |
26 | |
27 /* Fonts fixed in upper region */ | |
28 #include "Fonts/font_awe48.h" | |
29 #include "Fonts/font_T24.h" | |
30 #include "Fonts/font_T42.h" | |
31 #include "Fonts/font_T48_plus.h" | |
32 #include "Fonts/font_T54.h" | |
33 #include "Fonts/font_T84.h" | |
34 #include "Fonts/font_T105.h" | |
35 #include "Fonts/font_T144_plus.h" | |
36 | |
37 /* Images fixed in upper region */ | |
38 #include "Fonts/image_battery.h" | |
39 #include "Fonts/image_heinrichs_weikamp.h" | |
40 #include "Fonts/image_ostc.h" | |
41 | |
42 #endif // INCLUDE_FONTS_BINARY |