From 218d9c3eebf77b9174d468ce0120668855617688 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Sun, 3 Mar 2019 22:22:12 +0100 Subject: [PATCH] Added SdCardConfig class and Modified class diagram plus other little things --- documentation/app_class_diagram.mdj | 1946 ++++++++++++++++++++++++--- src/app/SAB.cpp | 18 +- src/app/SAB.h | 12 +- src/app/SDCardConfig.cpp | 12 + src/app/SDCardConfig.h | 13 + src/app/SDCardManager.cpp | 37 + src/app/SDCardManager.h | 8 +- src/app/ScreenManager.cpp | 6 +- src/app/app.ino | 19 +- src/app/definition.h | 3 + src/app/views.cpp | 2 +- src/app/views.h | 1 + 12 files changed, 1913 insertions(+), 164 deletions(-) create mode 100644 src/app/SDCardConfig.cpp create mode 100644 src/app/SDCardConfig.h diff --git a/documentation/app_class_diagram.mdj b/documentation/app_class_diagram.mdj index 42ae770..bd765fb 100644 --- a/documentation/app_class_diagram.mdj +++ b/documentation/app_class_diagram.mdj @@ -61,7 +61,7 @@ "font": "Arial;13;1", "left": 885, "top": 759, - "width": 570.4765625, + "width": 624.67919921875, "height": 13, "text": "SAB" }, @@ -96,7 +96,7 @@ "font": "Arial;13;0", "left": 880, "top": 752, - "width": 580.4765625, + "width": 634.67919921875, "height": 25, "stereotypeLabel": { "$ref": "AAAAAAFpHqCuVb5wRwE=" @@ -133,7 +133,7 @@ "font": "Arial;13;0", "left": 885, "top": 782, - "width": 570.4765625, + "width": 624.67919921875, "height": 13, "text": "-display: Adafruit_SSD1306", "horizontalAlignment": 0 @@ -150,11 +150,28 @@ "font": "Arial;13;0", "left": 885, "top": 797, - "width": 570.4765625, + "width": 624.67919921875, "height": 13, "text": "-rtc: const RTC_DS3231", "horizontalAlignment": 0 }, + { + "_type": "UMLAttributeView", + "_id": "AAAAAAFpRAFA08QB7bw=", + "_parent": { + "$ref": "AAAAAAFpHqCuVb50ZmE=" + }, + "model": { + "$ref": "AAAAAAFpRAFAo8P+2hc=" + }, + "font": "Arial;13;0", + "left": 885, + "top": 812, + "width": 624.67919921875, + "height": 13, + "text": "-sdCard: SD", + "horizontalAlignment": 0 + }, { "_type": "UMLAttributeView", "_id": "AAAAAAFpIJy3Sg3AUD8=", @@ -166,8 +183,8 @@ }, "font": "Arial;13;0", "left": 885, - "top": 812, - "width": 570.4765625, + "top": 827, + "width": 624.67919921875, "height": 13, "text": "-error: unsigned char", "horizontalAlignment": 0 @@ -176,8 +193,8 @@ "font": "Arial;13;0", "left": 880, "top": 777, - "width": 580.4765625, - "height": 53 + "width": 634.67919921875, + "height": 68 }, { "_type": "UMLOperationCompartmentView", @@ -200,8 +217,8 @@ }, "font": "Arial;13;0", "left": 885, - "top": 835, - "width": 570.4765625, + "top": 850, + "width": 624.67919921875, "height": 13, "text": "+SAB()", "horizontalAlignment": 0 @@ -217,10 +234,10 @@ }, "font": "Arial;13;0", "left": 885, - "top": 850, - "width": 570.4765625, + "top": 865, + "width": 624.67919921875, "height": 13, - "text": "+SAB(pinConfig: const PinMapping, screenConfig: const ScreenConfig)", + "text": "+SAB(pinConfig: const PinMapping, screenConfig: const ScreenConfig, sdCardConfig: const SDCardConfig)", "horizontalAlignment": 0 }, { @@ -234,8 +251,8 @@ }, "font": "Arial;13;0", "left": 885, - "top": 865, - "width": 570.4765625, + "top": 880, + "width": 624.67919921875, "height": 13, "text": "+const getScreenManager(): &ScreenManager", "horizontalAlignment": 0 @@ -251,12 +268,29 @@ }, "font": "Arial;13;0", "left": 885, - "top": 880, - "width": 570.4765625, + "top": 895, + "width": 624.67919921875, "height": 13, "text": "+const getRtcManager(): &RTCManager", "horizontalAlignment": 0 }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAFpRAHUY8XXRiM=", + "_parent": { + "$ref": "AAAAAAFpHqCuVb51X+k=" + }, + "model": { + "$ref": "AAAAAAFpRAHUOMXUqWA=" + }, + "font": "Arial;13;0", + "left": 885, + "top": 910, + "width": 624.67919921875, + "height": 13, + "text": "+getSdCardManager(): &SDCardManager", + "horizontalAlignment": 0 + }, { "_type": "UMLOperationView", "_id": "AAAAAAFpH8TLqegwKOg=", @@ -268,8 +302,8 @@ }, "font": "Arial;13;0", "left": 885, - "top": 895, - "width": 570.4765625, + "top": 925, + "width": 624.67919921875, "height": 13, "text": "+const getPinConfig(): PinMapping", "horizontalAlignment": 0 @@ -285,12 +319,29 @@ }, "font": "Arial;13;0", "left": 885, - "top": 910, - "width": 570.4765625, + "top": 940, + "width": 624.67919921875, "height": 13, "text": "+const getScreenConfig(): ScreenConfig", "horizontalAlignment": 0 }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAFpRAVjA8dyckA=", + "_parent": { + "$ref": "AAAAAAFpHqCuVb51X+k=" + }, + "model": { + "$ref": "AAAAAAFpRAVi2cdv0SM=" + }, + "font": "Arial;13;0", + "left": 885, + "top": 955, + "width": 624.67919921875, + "height": 13, + "text": "+const getSdCardConfig(): SDCardConfig", + "horizontalAlignment": 0 + }, { "_type": "UMLOperationView", "_id": "AAAAAAFpIJ1AmQ4/JFc=", @@ -302,8 +353,8 @@ }, "font": "Arial;13;0", "left": 885, - "top": 925, - "width": 570.4765625, + "top": 970, + "width": 624.67919921875, "height": 13, "text": "+const getError(): unsigned char", "horizontalAlignment": 0 @@ -311,9 +362,9 @@ ], "font": "Arial;13;0", "left": 880, - "top": 830, - "width": 580.4765625, - "height": 113 + "top": 845, + "width": 634.67919921875, + "height": 143 }, { "_type": "UMLReceptionCompartmentView", @@ -326,8 +377,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 328, - "top": 480, + "left": 200, + "top": 472, "width": 10, "height": 10 }, @@ -342,8 +393,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 328, - "top": 480, + "left": 200, + "top": 472, "width": 10, "height": 10 } @@ -352,7 +403,7 @@ "containerChangeable": true, "left": 880, "top": 752, - "width": 580.4765625, + "width": 634.67919921875, "height": 249, "nameCompartment": { "$ref": "AAAAAAFpHqCuVb5vsnk=" @@ -980,7 +1031,7 @@ "visible": false, "font": "Arial;13;0", "left": 815, - "top": 918, + "top": 920, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -1000,8 +1051,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 817, - "top": 933, + "left": 816, + "top": 935, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -1022,7 +1073,7 @@ "visible": false, "font": "Arial;13;0", "left": 812, - "top": 889, + "top": 891, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -1043,7 +1094,7 @@ "visible": false, "font": "Arial;13;0", "left": 854, - "top": 915, + "top": 917, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -1064,7 +1115,7 @@ "visible": false, "font": "Arial;13;0", "left": 853, - "top": 928, + "top": 930, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -1085,7 +1136,7 @@ "visible": false, "font": "Arial;13;0", "left": 856, - "top": 887, + "top": 889, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -1105,7 +1156,7 @@ }, "font": "Arial;13;0", "left": 760, - "top": 923, + "top": 924, "width": 94.65625, "height": 13, "alpha": -0.3058788210270264, @@ -1127,7 +1178,7 @@ "visible": false, "font": "Arial;13;0", "left": 779, - "top": 936, + "top": 937, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -1147,7 +1198,7 @@ "visible": false, "font": "Arial;13;0", "left": 769, - "top": 896, + "top": 897, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -1192,7 +1243,7 @@ "$ref": "AAAAAAFpHqCuVb5uVUA=" }, "lineStyle": 1, - "points": "879:904;749:917", + "points": "879:906;749:918", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpHucSvL8/DjI=" @@ -1653,8 +1704,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 863, - "top": 741, + "left": 862, + "top": 740, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -1761,7 +1812,7 @@ "$ref": "AAAAAAFpHqCuVb5uVUA=" }, "lineStyle": 1, - "points": "879:767;840:752;840:664;594:634", + "points": "879:766;840:752;840:664;594:634", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpHvH4IcMkhUs=" @@ -2769,8 +2820,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1089, - "top": 610, + "left": 1103, + "top": 611, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -2790,8 +2841,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 1074, - "top": 613, + "left": 1089, + "top": 615, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -2811,8 +2862,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1118, - "top": 603, + "left": 1132, + "top": 602, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -2832,8 +2883,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1117, - "top": 723, + "left": 1137, + "top": 724, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -2853,8 +2904,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1103, - "top": 724, + "left": 1123, + "top": 725, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -2874,8 +2925,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1145, - "top": 721, + "left": 1164, + "top": 720, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -2894,8 +2945,8 @@ "$ref": "AAAAAAFpH7XLo+OFwdw=" }, "font": "Arial;13;0", - "left": 1085, - "top": 476, + "left": 1091, + "top": 473, "width": 106.22802734375, "height": 13, "alpha": 1.216775001420921, @@ -2916,8 +2967,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1050, - "top": 503, + "left": 1057, + "top": 504, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -2936,8 +2987,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1088, - "top": 487, + "left": 1095, + "top": 486, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -2982,7 +3033,7 @@ "$ref": "AAAAAAFpHqCuVb5uVUA=" }, "lineStyle": 1, - "points": "1138:751;1071:475", + "points": "1159:751;1077:475", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpH7XLpOOIErM=" @@ -3338,8 +3389,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1347, - "top": 686, + "left": 1358, + "top": 687, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -3359,8 +3410,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 1337, - "top": 675, + "left": 1348, + "top": 676, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -3380,8 +3431,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1368, - "top": 709, + "left": 1379, + "top": 708, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -3401,7 +3452,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1316, + "left": 1329, "top": 716, "height": 13, "alpha": 0.5235987755982988, @@ -3422,7 +3473,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1308, + "left": 1322, "top": 705, "height": 13, "alpha": 0.7853981633974483, @@ -3443,8 +3494,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1331, - "top": 739, + "left": 1346, + "top": 738, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -3463,8 +3514,8 @@ "$ref": "AAAAAAFpH8b/0elfarA=" }, "font": "Arial;13;0", - "left": 1412, - "top": 659, + "left": 1419, + "top": 657, "width": 115.60986328125, "height": 13, "alpha": 2.256838422176435, @@ -3485,8 +3536,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1370, - "top": 649, + "left": 1377, + "top": 650, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -3505,8 +3556,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1402, - "top": 674, + "left": 1410, + "top": 675, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -3551,7 +3602,7 @@ "$ref": "AAAAAAFpHqCuVb5uVUA=" }, "lineStyle": 1, - "points": "1307:751;1410:657", + "points": "1322:751;1417:657", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpH8b/0eliwzQ=" @@ -3615,8 +3666,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -32, - "top": 352, + "left": 16, + "top": 448, "height": 13 }, { @@ -3626,8 +3677,8 @@ "$ref": "AAAAAAFpIVCNABPYowM=" }, "font": "Arial;13;1", - "left": 405, - "top": 1175, + "left": 429, + "top": 1223, "width": 153.55615234375, "height": 13, "text": "ViewLinkedList" @@ -3640,8 +3691,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -32, - "top": 352, + "left": 16, + "top": 448, "width": 73.67724609375, "height": 13, "text": "(from Model)" @@ -3654,15 +3705,15 @@ }, "visible": false, "font": "Arial;13;0", - "left": -32, - "top": 352, + "left": 16, + "top": 448, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 400, - "top": 1168, + "left": 424, + "top": 1216, "width": 163.55615234375, "height": 25, "stereotypeLabel": { @@ -3698,8 +3749,8 @@ "$ref": "AAAAAAFpIVFv0xYYyKo=" }, "font": "Arial;13;0", - "left": 405, - "top": 1198, + "left": 429, + "top": 1246, "width": 153.55615234375, "height": 13, "text": "+*pData: void", @@ -3715,8 +3766,8 @@ "$ref": "AAAAAAFpIVHZcha1vLw=" }, "font": "Arial;13;0", - "left": 405, - "top": 1213, + "left": 429, + "top": 1261, "width": 153.55615234375, "height": 13, "text": "+*logic_function: boolean", @@ -3732,8 +3783,8 @@ "$ref": "AAAAAAFpIVKy4BfqLR4=" }, "font": "Arial;13;0", - "left": 405, - "top": 1228, + "left": 429, + "top": 1276, "width": 153.55615234375, "height": 13, "text": "+UID: const unsigned char", @@ -3749,8 +3800,8 @@ "$ref": "AAAAAAFpIVL7ehiHAoI=" }, "font": "Arial;13;0", - "left": 405, - "top": 1243, + "left": 429, + "top": 1291, "width": 153.55615234375, "height": 13, "text": "+next: ViewLink*", @@ -3758,8 +3809,8 @@ } ], "font": "Arial;13;0", - "left": 400, - "top": 1193, + "left": 424, + "top": 1241, "width": 163.55615234375, "height": 68 }, @@ -3773,8 +3824,8 @@ "$ref": "AAAAAAFpIVCM/xPV/bU=" }, "font": "Arial;13;0", - "left": 400, - "top": 1261, + "left": 424, + "top": 1309, "width": 163.55615234375, "height": 10 }, @@ -3789,8 +3840,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, - "top": 176, + "left": 8, + "top": 224, "width": 10, "height": 10 }, @@ -3805,16 +3856,16 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, - "top": 176, + "left": 8, + "top": 224, "width": 10, "height": 10 } ], "font": "Arial;13;0", "containerChangeable": true, - "left": 400, - "top": 1168, + "left": 424, + "top": 1216, "width": 163.55615234375, "height": 133, "nameCompartment": { @@ -3854,8 +3905,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 495, - "top": 1152, + "left": 512, + "top": 1176, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -3875,8 +3926,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 510, - "top": 1152, + "left": 527, + "top": 1175, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -3896,8 +3947,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 466, - "top": 1153, + "left": 483, + "top": 1177, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -3917,8 +3968,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 496, - "top": 1171, + "left": 512, + "top": 1170, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -3938,8 +3989,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 509, - "top": 1174, + "left": 526, + "top": 1172, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -3959,8 +4010,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 468, - "top": 1167, + "left": 484, + "top": 1168, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -3980,8 +4031,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 496, - "top": 1135, + "left": 513, + "top": 1182, "height": 13, "alpha": -0.5235987755982988, "distance": 30, @@ -4000,8 +4051,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 509, - "top": 1132, + "left": 526, + "top": 1178, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -4020,8 +4071,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 468, - "top": 1139, + "left": 486, + "top": 1188, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -4066,7 +4117,7 @@ "$ref": "AAAAAAFpHq11gr6quCs=" }, "lineStyle": 1, - "points": "481:1152;481:1167", + "points": "496:1152;500:1215", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpIVDGIBS5fjw=" @@ -4130,7 +4181,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, + "left": -304, + "top": 96, "height": 13 }, { @@ -4140,9 +4192,9 @@ "$ref": "AAAAAAFpKneDch8PyEY=" }, "font": "Arial;13;1", - "left": 949, - "top": 1103, - "width": 207, + "left": 805, + "top": 1151, + "width": 335.98779296875, "height": 13, "text": "SDCardManager" }, @@ -4154,7 +4206,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, + "left": -304, + "top": 96, "width": 73.67724609375, "height": 13, "text": "(from Model)" @@ -4167,15 +4220,16 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, + "left": -304, + "top": 96, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 944, - "top": 1096, - "width": 217, + "left": 800, + "top": 1144, + "width": 345.98779296875, "height": 25, "stereotypeLabel": { "$ref": "AAAAAAFpKneDcx8QPkU=" @@ -4199,11 +4253,30 @@ "model": { "$ref": "AAAAAAFpKneDcR8MzCI=" }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAFpQ+jhV4x6GN0=", + "_parent": { + "$ref": "AAAAAAFpKneDcx8URfg=" + }, + "model": { + "$ref": "AAAAAAFpQ+jhH4xoZLI=" + }, + "font": "Arial;13;0", + "left": 805, + "top": 1174, + "width": 335.98779296875, + "height": 13, + "text": "-sdCardRef: SD&", + "horizontalAlignment": 0 + } + ], "font": "Arial;13;0", - "left": 944, - "top": 1121, - "width": 217, - "height": 10 + "left": 800, + "top": 1169, + "width": 345.98779296875, + "height": 23 }, { "_type": "UMLOperationCompartmentView", @@ -4214,11 +4287,47 @@ "model": { "$ref": "AAAAAAFpKneDcR8MzCI=" }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAFpQ9KM4kdfCJQ=", + "_parent": { + "$ref": "AAAAAAFpKneDcx8Vby4=" + }, + "model": { + "$ref": "AAAAAAFpQ9KMq0dNedU=" + }, + "font": "Arial;13;0", + "left": 805, + "top": 1197, + "width": 335.98779296875, + "height": 13, + "text": "#SDCardManager(sdCard: SD&)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAFpQ+/7m5sqeQQ=", + "_parent": { + "$ref": "AAAAAAFpKneDcx8Vby4=" + }, + "model": { + "$ref": "AAAAAAFpQ+/7VZsYeQU=" + }, + "font": "Arial;13;0", + "left": 805, + "top": 1212, + "width": 335.98779296875, + "height": 13, + "text": "+const getSize(sizeUnit: const SizeUnit = GBYTE): double", + "horizontalAlignment": 0 + } + ], "font": "Arial;13;0", - "left": 944, - "top": 1131, - "width": 217, - "height": 10 + "left": 800, + "top": 1192, + "width": 345.98779296875, + "height": 38 }, { "_type": "UMLReceptionCompartmentView", @@ -4231,7 +4340,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -8, + "left": -152, + "top": 48, "width": 10, "height": 10 }, @@ -4246,16 +4356,17 @@ }, "visible": false, "font": "Arial;13;0", - "left": -8, + "left": -152, + "top": 48, "width": 10, "height": 10 } ], "font": "Arial;13;0", "containerChangeable": true, - "left": 944, - "top": 1096, - "width": 217, + "left": 800, + "top": 1144, + "width": 345.98779296875, "height": 177, "nameCompartment": { "$ref": "AAAAAAFpKneDch8PyEY=" @@ -4632,6 +4743,1208 @@ "propertyLabel": { "$ref": "AAAAAAFpQ2gCbx62wlU=" } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAFpQ9QOOVifhmQ=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAFpQ9QOOVigqXo=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVifhmQ=" + }, + "model": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAFpQ9QOOVihAeI=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVigqXo=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -160, + "top": 32, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAFpQ9QOOViiZzo=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVigqXo=" + }, + "font": "Arial;13;1", + "left": 1357, + "top": 1111, + "width": 277.849609375, + "height": 13, + "text": "SDCardConfig" + }, + { + "_type": "LabelView", + "_id": "AAAAAAFpQ9QOOVijG5Y=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVigqXo=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -160, + "top": 32, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAFpQ9QOOVik2xk=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVigqXo=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -160, + "top": 32, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 1352, + "top": 1104, + "width": 287.849609375, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAFpQ9QOOVihAeI=" + }, + "nameLabel": { + "$ref": "AAAAAAFpQ9QOOViiZzo=" + }, + "namespaceLabel": { + "$ref": "AAAAAAFpQ9QOOVijG5Y=" + }, + "propertyLabel": { + "$ref": "AAAAAAFpQ9QOOVik2xk=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAFpQ9QOOVildEk=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVifhmQ=" + }, + "model": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "subViews": [ + { + "_type": "UMLAttributeView", + "_id": "AAAAAAFpQ9S7V1m7kGU=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVildEk=" + }, + "model": { + "$ref": "AAAAAAFpQ9S7ElmpF4o=" + }, + "font": "Arial;13;0", + "left": 1357, + "top": 1134, + "width": 277.849609375, + "height": 13, + "text": "-spi_speed: const uint32_t", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 1352, + "top": 1129, + "width": 287.849609375, + "height": 23 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAFpQ9QOOlim6SM=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVifhmQ=" + }, + "model": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAFpQ9ymNHaOlF8=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOlim6SM=" + }, + "model": { + "$ref": "AAAAAAFpQ9yl/3Z8akM=" + }, + "font": "Arial;13;0", + "left": 1357, + "top": 1157, + "width": 277.849609375, + "height": 13, + "text": "+SDCardConfig(spiSpeed: const uint32_t)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAFpQ9du0l7KcKc=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOlim6SM=" + }, + "model": { + "$ref": "AAAAAAFpQ9duml64Utk=" + }, + "font": "Arial;13;0", + "left": 1357, + "top": 1172, + "width": 277.849609375, + "height": 13, + "text": "+const getSPISpeed(): const uint32_t", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 1352, + "top": 1152, + "width": 287.849609375, + "height": 38 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAFpQ9QOOlinxjY=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVifhmQ=" + }, + "model": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -80, + "top": 16, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAFpQ9QOOliospg=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVifhmQ=" + }, + "model": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -80, + "top": 16, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 1352, + "top": 1104, + "width": 287.849609375, + "height": 86, + "nameCompartment": { + "$ref": "AAAAAAFpQ9QOOVigqXo=" + }, + "attributeCompartment": { + "$ref": "AAAAAAFpQ9QOOVildEk=" + }, + "operationCompartment": { + "$ref": "AAAAAAFpQ9QOOlim6SM=" + }, + "receptionCompartment": { + "$ref": "AAAAAAFpQ9QOOlinxjY=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAFpQ9QOOliospg=" + } + }, + { + "_type": "UMLAssociationView", + "_id": "AAAAAAFpQ9mWjm40zl8=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4wryM=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWjm416Yc=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4wryM=" + }, + "font": "Arial;13;0", + "left": 1455, + "top": 1080, + "width": 118.498046875, + "height": 13, + "alpha": 0.4643245900492968, + "distance": 129.5414991421668, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "edgePosition": 1, + "text": "-const sdCardConfig" + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWjm42jlY=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4wryM=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1410, + "top": 1023, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj2434T8=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4wryM=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1379, + "top": 1057, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj244GXM=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4xAQU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1363, + "top": 1001, + "height": 13, + "alpha": 0.5235987755982988, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "edgePosition": 2 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj245j7g=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4xAQU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1373, + "top": 992, + "height": 13, + "alpha": 0.7853981633974483, + "distance": 40, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "edgePosition": 2 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj246WPE=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4xAQU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1341, + "top": 1018, + "height": 13, + "alpha": -0.5235987755982988, + "distance": 25, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "edgePosition": 2 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj2472J4=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4ygsM=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1437, + "top": 1068, + "height": 13, + "alpha": -0.5235987755982988, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + } + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj248LJI=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4ygsM=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1444, + "top": 1057, + "height": 13, + "alpha": -0.7853981633974483, + "distance": 40, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + } + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ9mWj249+7c=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4ygsM=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1422, + "top": 1091, + "height": 13, + "alpha": 0.5235987755982988, + "distance": 25, + "hostEdge": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + } + }, + { + "_type": "UMLQualifierCompartmentView", + "_id": "AAAAAAFpQ9mWj24+vro=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4xAQU=" + }, + "visible": false, + "font": "Arial;13;0", + "width": 10, + "height": 10 + }, + { + "_type": "UMLQualifierCompartmentView", + "_id": "AAAAAAFpQ9mWj24/qVM=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm40zl8=" + }, + "model": { + "$ref": "AAAAAAFpQ9mWjm4ygsM=" + }, + "visible": false, + "font": "Arial;13;0", + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAFpQ9QOOVifhmQ=" + }, + "tail": { + "$ref": "AAAAAAFpHqCuVb5uVUA=" + }, + "lineStyle": 1, + "points": "1334:1001;1447:1103", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAFpQ9mWjm416Yc=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAFpQ9mWjm42jlY=" + }, + "propertyLabel": { + "$ref": "AAAAAAFpQ9mWj2434T8=" + }, + "tailRoleNameLabel": { + "$ref": "AAAAAAFpQ9mWj244GXM=" + }, + "tailPropertyLabel": { + "$ref": "AAAAAAFpQ9mWj245j7g=" + }, + "tailMultiplicityLabel": { + "$ref": "AAAAAAFpQ9mWj246WPE=" + }, + "headRoleNameLabel": { + "$ref": "AAAAAAFpQ9mWj2472J4=" + }, + "headPropertyLabel": { + "$ref": "AAAAAAFpQ9mWj248LJI=" + }, + "headMultiplicityLabel": { + "$ref": "AAAAAAFpQ9mWj249+7c=" + }, + "tailQualifiersCompartment": { + "$ref": "AAAAAAFpQ9mWj24+vro=" + }, + "headQualifiersCompartment": { + "$ref": "AAAAAAFpQ9mWj24/qVM=" + } + }, + { + "_type": "UMLAssociationView", + "_id": "AAAAAAFpQ+tDNo4EXBQ=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4A/XI=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44Fi84=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4A/XI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1084, + "top": 1073, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44GppM=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4A/XI=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 1097, + "top": 1081, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44H7V8=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4A/XI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1059, + "top": 1058, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44IfNE=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4BqHQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1115, + "top": 1024, + "height": 13, + "alpha": 0.5235987755982988, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "edgePosition": 2 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44JfOg=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4BqHQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1125, + "top": 1033, + "height": 13, + "alpha": 0.7853981633974483, + "distance": 40, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "edgePosition": 2 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44KXiY=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4BqHQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1094, + "top": 1006, + "height": 13, + "alpha": -0.5235987755982988, + "distance": 25, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "edgePosition": 2 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44Lo1c=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4CuqA=" + }, + "font": "Arial;13;0", + "left": 1057, + "top": 1114, + "width": 97.54443359375, + "height": 13, + "alpha": -0.7290417713619741, + "distance": 80.75270893288967, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "text": "-sdCardManager" + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44Mwa8=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4CuqA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1066, + "top": 1128, + "height": 13, + "alpha": -0.7853981633974483, + "distance": 40, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + } + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ+tDN44NCuw=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4CuqA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 1028, + "top": 1112, + "height": 13, + "alpha": 0.5235987755982988, + "distance": 25, + "hostEdge": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + } + }, + { + "_type": "UMLQualifierCompartmentView", + "_id": "AAAAAAFpQ+tDN44OZ5E=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4BqHQ=" + }, + "visible": false, + "font": "Arial;13;0", + "width": 10, + "height": 10 + }, + { + "_type": "UMLQualifierCompartmentView", + "_id": "AAAAAAFpQ+tDN44PlN4=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4EXBQ=" + }, + "model": { + "$ref": "AAAAAAFpQ+tDNo4CuqA=" + }, + "visible": false, + "font": "Arial;13;0", + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAFpKneDch8OUuM=" + }, + "tail": { + "$ref": "AAAAAAFpHqCuVb5uVUA=" + }, + "lineStyle": 1, + "points": "1117:1001;1028:1143", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAFpQ+tDN44Fi84=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAFpQ+tDN44GppM=" + }, + "propertyLabel": { + "$ref": "AAAAAAFpQ+tDN44H7V8=" + }, + "tailRoleNameLabel": { + "$ref": "AAAAAAFpQ+tDN44IfNE=" + }, + "tailPropertyLabel": { + "$ref": "AAAAAAFpQ+tDN44JfOg=" + }, + "tailMultiplicityLabel": { + "$ref": "AAAAAAFpQ+tDN44KXiY=" + }, + "headRoleNameLabel": { + "$ref": "AAAAAAFpQ+tDN44Lo1c=" + }, + "headPropertyLabel": { + "$ref": "AAAAAAFpQ+tDN44Mwa8=" + }, + "headMultiplicityLabel": { + "$ref": "AAAAAAFpQ+tDN44NCuw=" + }, + "tailQualifiersCompartment": { + "$ref": "AAAAAAFpQ+tDN44OZ5E=" + }, + "headQualifiersCompartment": { + "$ref": "AAAAAAFpQ+tDN44PlN4=" + } + }, + { + "_type": "UMLEnumerationView", + "_id": "AAAAAAFpQ/IawK+obm4=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAFpQ/IawK+pmSI=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAFpQ/IawK+qNw8=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+pmSI=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1181, + "width": 116.34619140625, + "height": 13, + "text": "«enumeration»" + }, + { + "_type": "LabelView", + "_id": "AAAAAAFpQ/IawK+rs18=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+pmSI=" + }, + "font": "Arial;13;1", + "left": 621, + "top": 1196, + "width": 116.34619140625, + "height": 13, + "text": "SizeUnit" + }, + { + "_type": "LabelView", + "_id": "AAAAAAFpQ/IawK+sTwg=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+pmSI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -1440, + "top": -320, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAFpQ/IawK+tngA=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+pmSI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -1440, + "top": -320, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 616, + "top": 1176, + "width": 126.34619140625, + "height": 38, + "stereotypeLabel": { + "$ref": "AAAAAAFpQ/IawK+qNw8=" + }, + "nameLabel": { + "$ref": "AAAAAAFpQ/IawK+rs18=" + }, + "namespaceLabel": { + "$ref": "AAAAAAFpQ/IawK+sTwg=" + }, + "propertyLabel": { + "$ref": "AAAAAAFpQ/IawK+tngA=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAFpQ/IawK+u8bI=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -720, + "top": -160, + "width": 10, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAFpQ/IawK+v89E=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -720, + "top": -160, + "width": 10, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAFpQ/IawK+wKQI=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -720, + "top": -160, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAFpQ/IawK+x1AY=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -720, + "top": -160, + "width": 10, + "height": 10 + }, + { + "_type": "UMLEnumerationLiteralCompartmentView", + "_id": "AAAAAAFpQ/IawK+ymkc=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "model": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "subViews": [ + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/J2vbPHBfY=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/J2ebOvHFw=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1219, + "width": 116.34619140625, + "height": 13, + "text": "BIT", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/KkPLSgiBs=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/Kj97SIuvc=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1234, + "width": 116.34619140625, + "height": 13, + "text": "BYTE", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/KwrbU66pw=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/KwcLUi39g=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1249, + "width": 116.34619140625, + "height": 13, + "text": "KBIT", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/LPDbXUZkc=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/LOy7W8rTg=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1264, + "width": 116.34619140625, + "height": 13, + "text": "KBYTE", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/Lg/rZuCOo=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/LgwbZWUvU=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1279, + "width": 116.34619140625, + "height": 13, + "text": "MBIT", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/OaVrdHZaY=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/OaGbcvMjs=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1294, + "width": 116.34619140625, + "height": 13, + "text": "MBYTE", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/OpH7fho5I=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/Oo4LfJBu8=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1309, + "width": 116.34619140625, + "height": 13, + "text": "GBIT", + "horizontalAlignment": 0 + }, + { + "_type": "UMLEnumerationLiteralView", + "_id": "AAAAAAFpQ/O1P7h7l+8=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + }, + "model": { + "$ref": "AAAAAAFpQ/O1ALhj/oY=" + }, + "font": "Arial;13;0", + "left": 621, + "top": 1324, + "width": 116.34619140625, + "height": 13, + "text": "GBYTE", + "horizontalAlignment": 0 + } + ], + "font": "Arial;13;0", + "left": 616, + "top": 1214, + "width": 126.34619140625, + "height": 128 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 616, + "top": 1176, + "width": 126.34619140625, + "height": 166, + "nameCompartment": { + "$ref": "AAAAAAFpQ/IawK+pmSI=" + }, + "suppressAttributes": true, + "suppressOperations": true, + "attributeCompartment": { + "$ref": "AAAAAAFpQ/IawK+u8bI=" + }, + "operationCompartment": { + "$ref": "AAAAAAFpQ/IawK+v89E=" + }, + "receptionCompartment": { + "$ref": "AAAAAAFpQ/IawK+wKQI=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAFpQ/IawK+x1AY=" + }, + "enumerationLiteralCompartment": { + "$ref": "AAAAAAFpQ/IawK+ymkc=" + } + }, + { + "_type": "UMLDependencyView", + "_id": "AAAAAAFpQ/Pv17tNl6c=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAFpQ/Pv17tL/oU=" + }, + "subViews": [ + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ/Pv17tOWK0=", + "_parent": { + "$ref": "AAAAAAFpQ/Pv17tNl6c=" + }, + "model": { + "$ref": "AAAAAAFpQ/Pv17tL/oU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 771, + "top": 1257, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAFpQ/Pv17tNl6c=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ/Pv17tP4nI=", + "_parent": { + "$ref": "AAAAAAFpQ/Pv17tNl6c=" + }, + "model": { + "$ref": "AAAAAAFpQ/Pv17tL/oU=" + }, + "visible": null, + "font": "Arial;13;0", + "left": 773, + "top": 1272, + "height": 13, + "alpha": 1.5707963267948966, + "distance": 30, + "hostEdge": { + "$ref": "AAAAAAFpQ/Pv17tNl6c=" + }, + "edgePosition": 1 + }, + { + "_type": "EdgeLabelView", + "_id": "AAAAAAFpQ/Pv17tQB6s=", + "_parent": { + "$ref": "AAAAAAFpQ/Pv17tNl6c=" + }, + "model": { + "$ref": "AAAAAAFpQ/Pv17tL/oU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 768, + "top": 1228, + "height": 13, + "alpha": -1.5707963267948966, + "distance": 15, + "hostEdge": { + "$ref": "AAAAAAFpQ/Pv17tNl6c=" + }, + "edgePosition": 1 + } + ], + "font": "Arial;13;0", + "head": { + "$ref": "AAAAAAFpQ/IawK+obm4=" + }, + "tail": { + "$ref": "AAAAAAFpKneDch8OUuM=" + }, + "lineStyle": 1, + "points": "799:1247;742:1252", + "showVisibility": true, + "nameLabel": { + "$ref": "AAAAAAFpQ/Pv17tOWK0=" + }, + "stereotypeLabel": { + "$ref": "AAAAAAFpQ/Pv17tP4nI=" + }, + "propertyLabel": { + "$ref": "AAAAAAFpQ/Pv17tQB6s=" + } } ] }, @@ -4805,6 +6118,66 @@ }, "visibility": "private" } + }, + { + "_type": "UMLAssociation", + "_id": "AAAAAAFpQ9mWjm4wryM=", + "_parent": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "name": "const sdCardConfig", + "end1": { + "_type": "UMLAssociationEnd", + "_id": "AAAAAAFpQ9mWjm4xAQU=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm4wryM=" + }, + "reference": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "navigable": false + }, + "end2": { + "_type": "UMLAssociationEnd", + "_id": "AAAAAAFpQ9mWjm4ygsM=", + "_parent": { + "$ref": "AAAAAAFpQ9mWjm4wryM=" + }, + "reference": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + } + }, + "visibility": "private" + }, + { + "_type": "UMLAssociation", + "_id": "AAAAAAFpQ+tDNo4A/XI=", + "_parent": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "end1": { + "_type": "UMLAssociationEnd", + "_id": "AAAAAAFpQ+tDNo4BqHQ=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4A/XI=" + }, + "reference": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "navigable": false + }, + "end2": { + "_type": "UMLAssociationEnd", + "_id": "AAAAAAFpQ+tDNo4CuqA=", + "_parent": { + "$ref": "AAAAAAFpQ+tDNo4A/XI=" + }, + "name": "sdCardManager", + "reference": { + "$ref": "AAAAAAFpKneDcR8MzCI=" + }, + "visibility": "private" + } } ], "attributes": [ @@ -4828,6 +6201,16 @@ "visibility": "private", "type": "const RTC_DS3231" }, + { + "_type": "UMLAttribute", + "_id": "AAAAAAFpRAFAo8P+2hc=", + "_parent": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "name": "sdCard", + "visibility": "private", + "type": "SD" + }, { "_type": "UMLAttribute", "_id": "AAAAAAFpIJy3HQ29knI=", @@ -4873,6 +6256,15 @@ }, "name": "screenConfig", "type": "const ScreenConfig" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAFpQ+gMR4S8bog=", + "_parent": { + "$ref": "AAAAAAFpHvoxW8cKCvI=" + }, + "name": "sdCardConfig", + "type": "const SDCardConfig" } ] }, @@ -4914,6 +6306,25 @@ } ] }, + { + "_type": "UMLOperation", + "_id": "AAAAAAFpRAHUOMXUqWA=", + "_parent": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "name": "getSdCardManager", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAFpRAJhC8bFkRU=", + "_parent": { + "$ref": "AAAAAAFpRAHUOMXUqWA=" + }, + "type": "&SDCardManager", + "direction": "return" + } + ] + }, { "_type": "UMLOperation", "_id": "AAAAAAFpH8TLd+gtxdc=", @@ -4956,6 +6367,27 @@ } ] }, + { + "_type": "UMLOperation", + "_id": "AAAAAAFpRAVi2cdv0SM=", + "_parent": { + "$ref": "AAAAAAFpHqCuU75sfJc=" + }, + "name": "const getSdCardConfig", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAFpRAXDwshgjp0=", + "_parent": { + "$ref": "AAAAAAFpRAVi2cdv0SM=" + }, + "type": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "direction": "return" + } + ] + }, { "_type": "UMLOperation", "_id": "AAAAAAFpIJ1Abg48fno=", @@ -6410,7 +7842,85 @@ "_parent": { "$ref": "AAAAAAFF+qBWK6M3Z8Y=" }, - "name": "SDCardManager" + "name": "SDCardManager", + "ownedElements": [ + { + "_type": "UMLDependency", + "_id": "AAAAAAFpQ/Pv17tL/oU=", + "_parent": { + "$ref": "AAAAAAFpKneDcR8MzCI=" + }, + "source": { + "$ref": "AAAAAAFpKneDcR8MzCI=" + }, + "target": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + } + } + ], + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAFpQ+jhH4xoZLI=", + "_parent": { + "$ref": "AAAAAAFpKneDcR8MzCI=" + }, + "name": "sdCardRef", + "visibility": "private", + "type": "SD&" + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAFpQ9KMq0dNedU=", + "_parent": { + "$ref": "AAAAAAFpKneDcR8MzCI=" + }, + "name": "SDCardManager", + "visibility": "protected", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAFpQ+sc642kwj0=", + "_parent": { + "$ref": "AAAAAAFpQ9KMq0dNedU=" + }, + "name": "sdCard", + "type": "SD&" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAFpQ+/7VZsYeQU=", + "_parent": { + "$ref": "AAAAAAFpKneDcR8MzCI=" + }, + "name": "const getSize", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAFpQ/GM4JvHpoI=", + "_parent": { + "$ref": "AAAAAAFpQ+/7VZsYeQU=" + }, + "name": "sizeUnit", + "type": "const SizeUnit", + "defaultValue": "GBYTE" + }, + { + "_type": "UMLParameter", + "_id": "AAAAAAFpQ/GM4JvIMbI=", + "_parent": { + "$ref": "AAAAAAFpQ+/7VZsYeQU=" + }, + "type": "double", + "direction": "return" + } + ] + } + ] }, { "_type": "UMLEnumeration", @@ -6461,6 +7971,140 @@ "name": "OR_270" } ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAFpQ9QOOVidDCY=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "SDCardConfig", + "attributes": [ + { + "_type": "UMLAttribute", + "_id": "AAAAAAFpQ9S7ElmpF4o=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "name": "spi_speed", + "visibility": "private", + "type": "const uint32_t" + } + ], + "operations": [ + { + "_type": "UMLOperation", + "_id": "AAAAAAFpQ9yl/3Z8akM=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "name": "SDCardConfig", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAFpQ90nZncCfoI=", + "_parent": { + "$ref": "AAAAAAFpQ9yl/3Z8akM=" + }, + "name": "spiSpeed", + "type": "const uint32_t" + } + ] + }, + { + "_type": "UMLOperation", + "_id": "AAAAAAFpQ9duml64Utk=", + "_parent": { + "$ref": "AAAAAAFpQ9QOOVidDCY=" + }, + "name": "const getSPISpeed", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAFpQ9h/81/PsHY=", + "_parent": { + "$ref": "AAAAAAFpQ9duml64Utk=" + }, + "type": "const uint32_t", + "direction": "return" + } + ] + } + ] + }, + { + "_type": "UMLEnumeration", + "_id": "AAAAAAFpQ/IawK+m1uc=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "SizeUnit", + "literals": [ + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/J2ebOvHFw=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "BIT" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/Kj97SIuvc=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "BYTE" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/KwcLUi39g=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "KBIT" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/LOy7W8rTg=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "KBYTE" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/LgwbZWUvU=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "MBIT" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/OaGbcvMjs=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "MBYTE" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/Oo4LfJBu8=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "GBIT" + }, + { + "_type": "UMLEnumerationLiteral", + "_id": "AAAAAAFpQ/O1ALhj/oY=", + "_parent": { + "$ref": "AAAAAAFpQ/IawK+m1uc=" + }, + "name": "GBYTE" + } + ] } ] } diff --git a/src/app/SAB.cpp b/src/app/SAB.cpp index 670d21f..0892f84 100644 --- a/src/app/SAB.cpp +++ b/src/app/SAB.cpp @@ -1,6 +1,6 @@ #include "SAB.h" -SAB::SAB() : _screenConfig(128, 64, 0x3C), _display(_screenConfig.getWidth(), _screenConfig.getHeight(), &Wire), _screenManager(_display), _rtc(), _rtcManager(_rtc), _error(0) +SAB::SAB() : _screenConfig(128, 64, 0x3C), _sdCardConfig(SPI_FULL_SPEED), _display(_screenConfig.getWidth(), _screenConfig.getHeight(), &Wire), _screenManager(_display), _rtc(), _rtcManager(_rtc), _sdCard(), _sdCardManager(_sdCard), _error(0) { Serial.begin(9600); delay(200); @@ -8,10 +8,11 @@ SAB::SAB() : _screenConfig(128, 64, 0x3C), _display(_screenConfig.getWidth(), _s //We initialize the pins for the I2C communication Wire.begin(_pinConfig.getI2C_sda(), _pinConfig.getI2C_scl()); if(!_rtc.begin()) _error |= RTC_BEGIN_ERR; - if(!_display.begin(SSD1306_SWITCHCAPVCC, _screenConfig.getAddress())){ _error |= DISP_BEGIN_ERR; Serial.println("Display begin error");} + if(!_display.begin(SSD1306_SWITCHCAPVCC, _screenConfig.getAddress())){ _error |= DISP_BEGIN_ERR; } + if(!_sdCard.begin(_sdCardConfig.getSPISpeed(), _pinConfig.getSPI_sdCard_cs())){ _error |= SDCARD_INIT_ERR; } } -SAB::SAB(const PinMapping pinConfig, const ScreenConfig screenConfig) : _pinConfig(pinConfig), _screenConfig(screenConfig), _display(_screenConfig.getWidth(), _screenConfig.getHeight(), &Wire), _screenManager(_display), _rtc(), _rtcManager(_rtc), _error(0) +SAB::SAB(const PinMapping pinConfig, const ScreenConfig screenConfig, const SDCardConfig sdCardConfig) : _pinConfig(pinConfig), _screenConfig(screenConfig), _sdCardConfig(sdCardConfig), _display(_screenConfig.getWidth(), _screenConfig.getHeight(), &Wire), _screenManager(_display), _rtc(), _rtcManager(_rtc), _sdCard(),_sdCardManager(_sdCard), _error(0) { Serial.begin(9600); delay(200); @@ -20,6 +21,7 @@ SAB::SAB(const PinMapping pinConfig, const ScreenConfig screenConfig) : _pinConf Wire.begin(_pinConfig.getI2C_sda(), _pinConfig.getI2C_scl()); if(!_rtc.begin()) _error |= RTC_BEGIN_ERR; if(!_display.begin(SSD1306_SWITCHCAPVCC, _screenConfig.getAddress())) _error |= DISP_BEGIN_ERR; + if(!_sdCard.begin(_sdCardConfig.getSPISpeed(), _pinConfig.getSPI_sdCard_cs())){ _error |= SDCARD_INIT_ERR;} } ScreenManager& SAB::getScreenManager() @@ -32,6 +34,11 @@ const RtcManager& SAB::getRtcManager() const return _rtcManager; } +SDCardManager& SAB::getSdCardManager() +{ + return _sdCardManager; +} + ScreenConfig SAB::getScreenConfig() const { return _screenConfig; @@ -42,6 +49,11 @@ PinMapping SAB::getPinConfig() const return _pinConfig; } +SDCardConfig SAB::getSdCardConfig() const +{ + return _sdCardConfig; +} + unsigned char SAB::getError() const { return _error; diff --git a/src/app/SAB.h b/src/app/SAB.h index 4a30c0e..874ca68 100644 --- a/src/app/SAB.h +++ b/src/app/SAB.h @@ -2,32 +2,42 @@ #define SAB_H #include "PinMapping.h" #include "ScreenConfig.h" +#include "SDCardConfig.h" #include "RtcManager.h" #include "ScreenManager.h" +#include "SDCardManager.h" #include #include +#include class SAB { public: SAB(); - SAB(const PinMapping pinConfig, const ScreenConfig screenConfig); + SAB(const PinMapping pinConfig, const ScreenConfig screenConfig, const SDCardConfig sdCardConfig); ScreenManager& getScreenManager(); const RtcManager& getRtcManager() const; + SDCardManager& getSdCardManager(); ScreenConfig getScreenConfig() const; PinMapping getPinConfig() const; + SDCardConfig getSdCardConfig() const; unsigned char getError() const; private: const PinMapping _pinConfig; const ScreenConfig _screenConfig; + const SDCardConfig _sdCardConfig; Adafruit_SSD1306 _display; ScreenManager _screenManager; + const RTC_DS3231 _rtc; const RtcManager _rtcManager; + SDClass _sdCard; + SDCardManager _sdCardManager; + unsigned char _error; }; diff --git a/src/app/SDCardConfig.cpp b/src/app/SDCardConfig.cpp new file mode 100644 index 0000000..f71ab98 --- /dev/null +++ b/src/app/SDCardConfig.cpp @@ -0,0 +1,12 @@ +#include +#include "SDCardConfig.h" + +SDCardConfig::SDCardConfig(const uint32_t spiSpeed) : _spiSpeed(spiSpeed) +{ +} + +const uint32_t SDCardConfig::getSPISpeed() const +{ + return _spiSpeed; +} + diff --git a/src/app/SDCardConfig.h b/src/app/SDCardConfig.h new file mode 100644 index 0000000..33d4f87 --- /dev/null +++ b/src/app/SDCardConfig.h @@ -0,0 +1,13 @@ +#ifndef SDCARDCONFIG_H +#define SDCARDCONFIG_H + +class SDCardConfig +{ + public: + SDCardConfig(const uint32_t spiSpeed); + const uint32_t getSPISpeed() const; + private: + const uint32_t _spiSpeed; +}; + +#endif //SDCARDCONFIG_H diff --git a/src/app/SDCardManager.cpp b/src/app/SDCardManager.cpp index 2b10fef..309d9bb 100644 --- a/src/app/SDCardManager.cpp +++ b/src/app/SDCardManager.cpp @@ -1,2 +1,39 @@ #include "SDCardManager.h" +SDCardManager::SDCardManager(SDClass& sdCard) : _sdCardRef(sdCard) +{ +} + +double SDCardManager::getSize(const SizeUnit sizeUnit) const +{ + long numberOf512ByteChunks = _sdCardRef.cardSize(); + long unit = 0; + double result = 0; + + switch(sizeUnit) + { + case KBIT: + result = (double)numberOf512ByteChunks/2.0*8; + break; + case KBYTE: + result = (double)numberOf512ByteChunks/2.0; + break; + case MBIT: + result = (double)numberOf512ByteChunks/2.0/1024.0*8; + break; + case MBYTE: + result = (double)numberOf512ByteChunks/2.0/1024.0; + break; + case GBIT: + result = (double)numberOf512ByteChunks/2.0/1024.0/1024.0*8; + break; + case GBYTE: + result = (double)numberOf512ByteChunks/2.0/1024.0/1024.0; + break; + default: + result = (double)numberOf512ByteChunks/2.0/1024.0/1024.0; + } + + return result; +} + diff --git a/src/app/SDCardManager.h b/src/app/SDCardManager.h index bba652c..7810e35 100644 --- a/src/app/SDCardManager.h +++ b/src/app/SDCardManager.h @@ -1,15 +1,17 @@ #ifndef SDCARDMANAGER_H #define SDCARDMANAGER_H +#include +#include "definition.h" class SDCardManager { friend class SAB; public: - + double getSize(const SizeUnit sizeUnit = GBYTE) const; protected: - + SDCardManager(SDClass& sdCard); private: - + SDClass& _sdCardRef; }; #endif //SDCARDMANAGER_H diff --git a/src/app/ScreenManager.cpp b/src/app/ScreenManager.cpp index 9b9cfe0..9b6105d 100644 --- a/src/app/ScreenManager.cpp +++ b/src/app/ScreenManager.cpp @@ -136,7 +136,7 @@ boolean ScreenManager::displayView(const int UID) if(UID == -1 && _currentView == NO_CURRENT_VIEW) { //We display an error message on the screen - Serial.println("No current view to display"); + return false; } else if(UID == -1) @@ -153,12 +153,12 @@ boolean ScreenManager::displayView(const int UID) if(viewLink == NULL) { //We display an error message on the screen - Serial.println("View not found"); + return false; }else if(viewLink->viewLogicFunction == NULL) { //We display an error message on the screen - Serial.println("View logic undefined"); + return false; } diff --git a/src/app/app.ino b/src/app/app.ino index b119c4c..079b861 100644 --- a/src/app/app.ino +++ b/src/app/app.ino @@ -7,13 +7,21 @@ SAB sab; unsigned char *memoryEater = NULL; unsigned long currentMs = 0; -DateTimePacket dtp = {sab.getRtcManager().getDateTime()}; +int mySize = 0; +DateTimePacket dtp = {sab.getRtcManager().getDateTime(), sab.getSdCardManager().getSize(GBYTE)}; void setup() { // put your setup code here, to run once: Serial.println("Starting setup"); sab.getScreenManager().addView(&(view_1), &dtp, 1); + + Serial.print("SD size : ");Serial.println(sab.getSdCardManager().getSize(GBYTE)); + Serial.print("SD size : ");Serial.println(sab.getSdCardManager().getSize(GBIT)); + Serial.print("SD size : ");Serial.println(sab.getSdCardManager().getSize(MBYTE)); + Serial.print("SD size : ");Serial.println(sab.getSdCardManager().getSize(MBIT)); + Serial.print("SD size : ");Serial.println(sab.getSdCardManager().getSize(KBYTE)); + Serial.print("SD size : ");Serial.println(sab.getSdCardManager().getSize(KBIT)); Serial.println("End setup"); } @@ -24,6 +32,13 @@ void loop() { currentMs = millis(); dtp.dateTime = sab.getRtcManager().getDateTime(); sab.getScreenManager().displayView(1); - memoryEater = (unsigned char *) malloc(sizeof(char)); + + unsigned char *temp = (unsigned char *) realloc(memoryEater,sizeof(unsigned char) * ++mySize); + if(temp != NULL) + memoryEater = temp; + else + { + free(memoryEater);memoryEater = NULL;mySize = 0; + } } } diff --git a/src/app/definition.h b/src/app/definition.h index ef9deb6..c29d72f 100644 --- a/src/app/definition.h +++ b/src/app/definition.h @@ -21,6 +21,7 @@ typedef enum { GPIO_0 = 0, #define RTC_BEGIN_ERR B00000001 #define DISP_BEGIN_ERR B00000010 +#define SDCARD_INIT_ERR B00000100 #define MALLOC_ERR B00000001 @@ -28,6 +29,8 @@ typedef enum { GPIO_0 = 0, #define LAST_VIEW -1 typedef enum { OR_0 = 2, OR_90 = 3, OR_180 = 0, OR_270 = 1 } Orientation; +typedef enum { BIT = 0, BYTE, KBIT, KBYTE, MBIT, MBYTE, GBIT, GBYTE } SizeUnit; + //Data structure for the view handling typedef struct viewLink{ boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*); diff --git a/src/app/views.cpp b/src/app/views.cpp index 9a300b2..c3b3ea8 100644 --- a/src/app/views.cpp +++ b/src/app/views.cpp @@ -4,7 +4,7 @@ boolean view_1(Adafruit_SSD1306 &display, void *pData) { char time_str[300] = ""; DateTimePacket *p = (DateTimePacket *) pData; - sprintf(time_str,"RTC:time--> %d:%d:%d\ndate--> %d/%d/%d\nFree RAM : %d\n",p->dateTime.hour(), p->dateTime.minute(), p->dateTime.second(), p->dateTime.day(), p->dateTime.month(), p->dateTime.year(),ESP.getFreeHeap()); + sprintf(time_str,"RTC:time--> %d:%d:%d\ndate--> %d/%d/%d\nFree RAM : %d\nSdCard : %.2fGB\n",p->dateTime.hour(), p->dateTime.minute(), p->dateTime.second(), p->dateTime.day(), p->dateTime.month(), p->dateTime.year(),ESP.getFreeHeap(),p->sdCardSize); display.println(time_str); return true; diff --git a/src/app/views.h b/src/app/views.h index 5864902..582f304 100644 --- a/src/app/views.h +++ b/src/app/views.h @@ -6,6 +6,7 @@ typedef struct dateTimePacket { DateTime dateTime; + float sdCardSize; } DateTimePacket; boolean view_1(Adafruit_SSD1306 &display, void *pData);