소스 검색

Merge branch 'master' of git.gottschlag.net:bernd/smart-home

Bernd Gottschlag 5 년 전
부모
커밋
8f2658655e
5개의 변경된 파일124개의 추가작업 그리고 101개의 파일을 삭제
  1. 80
    72
      display/firmware/Cargo.lock
  2. 2
    2
      display/firmware/Cargo.toml
  3. 4
    4
      display/firmware/build.rs
  4. 38
    22
      display/firmware/src/display.rs
  5. 0
    1
      display/firmware/src/main.rs

+ 80
- 72
display/firmware/Cargo.lock 파일 보기

@@ -56,9 +56,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
56 56
 
57 57
 [[package]]
58 58
 name = "cc"
59
-version = "1.0.50"
59
+version = "1.0.52"
60 60
 source = "registry+https://github.com/rust-lang/crates.io-index"
61 61
 
62
+[[package]]
63
+name = "cmake"
64
+version = "0.1.42"
65
+source = "registry+https://github.com/rust-lang/crates.io-index"
66
+dependencies = [
67
+ "cc 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)",
68
+]
69
+
62 70
 [[package]]
63 71
 name = "cortex-m"
64 72
 version = "0.6.2"
@@ -84,8 +92,8 @@ version = "0.1.8"
84 92
 source = "registry+https://github.com/rust-lang/crates.io-index"
85 93
 dependencies = [
86 94
  "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
87
- "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
88
- "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
95
+ "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
96
+ "syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
89 97
 ]
90 98
 
91 99
 [[package]]
@@ -106,9 +114,9 @@ version = "0.5.0"
106 114
 source = "registry+https://github.com/rust-lang/crates.io-index"
107 115
 dependencies = [
108 116
  "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
109
- "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
117
+ "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
110 118
  "rtfm-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
111
- "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
119
+ "syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
112 120
 ]
113 121
 
114 122
 [[package]]
@@ -128,27 +136,18 @@ dependencies = [
128 136
  "cortex-m-rt 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
129 137
  "cortex-m-rtfm 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
130 138
  "cortex-m-semihosting 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
131
- "embedded-epd 0.1.0 (git+https://github.com/mgottschlag/rust-embedded-epd)",
132 139
  "embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
133 140
  "embedded-nrf24l01 0.2.0 (git+https://github.com/astro/embedded-nrf24l01)",
134
- "epd-assets 0.1.0 (git+https://github.com/mgottschlag/rust-epd-assets)",
135 141
  "epd-waveshare 0.4.0 (git+https://github.com/mgottschlag/epd-waveshare.git?branch=streaming)",
136 142
  "mkl25z4 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
137 143
  "mkl25z4-hal 0.1.0 (git+https://github.com/mgottschlag/mkl25z4-hal)",
138 144
  "nb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
139 145
  "panic-semihosting 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
146
+ "tinygfx 0.1.0 (git+https://github.com/mgottschlag/tinygfx)",
147
+ "tinygfx-assets 0.1.0 (git+https://github.com/mgottschlag/tinygfx)",
140 148
  "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
141 149
 ]
142 150
 
143
-[[package]]
144
-name = "embedded-epd"
145
-version = "0.1.0"
146
-source = "git+https://github.com/mgottschlag/rust-embedded-epd#5ce5a2fd7b84a86938680adab393132d68d01e77"
147
-dependencies = [
148
- "embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
149
- "nb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
150
-]
151
-
152 151
 [[package]]
153 152
 name = "embedded-graphics"
154 153
 version = "0.6.2"
@@ -175,15 +174,6 @@ dependencies = [
175 174
  "embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
176 175
 ]
177 176
 
178
-[[package]]
179
-name = "epd-assets"
180
-version = "0.1.0"
181
-source = "git+https://github.com/mgottschlag/rust-epd-assets#3feee66fa2b6885525cb829045102f2dae1b8521"
182
-dependencies = [
183
- "freetype-rs 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
184
- "lodepng 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
185
-]
186
-
187 177
 [[package]]
188 178
 name = "epd-waveshare"
189 179
 version = "0.4.0"
@@ -195,21 +185,21 @@ dependencies = [
195 185
 
196 186
 [[package]]
197 187
 name = "freetype-rs"
198
-version = "0.19.1"
188
+version = "0.24.0"
199 189
 source = "registry+https://github.com/rust-lang/crates.io-index"
200 190
 dependencies = [
201 191
  "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
202
- "freetype-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
203
- "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
192
+ "freetype-sys 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
193
+ "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)",
204 194
 ]
205 195
 
206 196
 [[package]]
207 197
 name = "freetype-sys"
208
-version = "0.7.1"
198
+version = "0.11.0"
209 199
 source = "registry+https://github.com/rust-lang/crates.io-index"
210 200
 dependencies = [
211
- "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
212
- "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
201
+ "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
202
+ "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)",
213 203
  "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
214 204
 ]
215 205
 
@@ -218,7 +208,7 @@ name = "generic-array"
218 208
 version = "0.12.3"
219 209
 source = "registry+https://github.com/rust-lang/crates.io-index"
220 210
 dependencies = [
221
- "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
211
+ "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
222 212
 ]
223 213
 
224 214
 [[package]]
@@ -226,7 +216,7 @@ name = "generic-array"
226 216
 version = "0.13.2"
227 217
 source = "registry+https://github.com/rust-lang/crates.io-index"
228 218
 dependencies = [
229
- "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
219
+ "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
230 220
 ]
231 221
 
232 222
 [[package]]
@@ -258,27 +248,16 @@ dependencies = [
258 248
 
259 249
 [[package]]
260 250
 name = "libc"
261
-version = "0.2.68"
251
+version = "0.2.69"
262 252
 source = "registry+https://github.com/rust-lang/crates.io-index"
263 253
 
264
-[[package]]
265
-name = "libz-sys"
266
-version = "1.0.25"
267
-source = "registry+https://github.com/rust-lang/crates.io-index"
268
-dependencies = [
269
- "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
270
- "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
271
- "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
272
- "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
273
-]
274
-
275 254
 [[package]]
276 255
 name = "lodepng"
277
-version = "2.5.0"
256
+version = "2.6.0"
278 257
 source = "registry+https://github.com/rust-lang/crates.io-index"
279 258
 dependencies = [
280
- "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)",
281
- "rgb 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)",
259
+ "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)",
260
+ "rgb 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
282 261
 ]
283 262
 
284 263
 [[package]]
@@ -333,7 +312,7 @@ dependencies = [
333 312
 
334 313
 [[package]]
335 314
 name = "quote"
336
-version = "1.0.3"
315
+version = "1.0.4"
337 316
 source = "registry+https://github.com/rust-lang/crates.io-index"
338 317
 dependencies = [
339 318
  "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -346,7 +325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
346 325
 
347 326
 [[package]]
348 327
 name = "rgb"
349
-version = "0.8.16"
328
+version = "0.8.17"
350 329
 source = "registry+https://github.com/rust-lang/crates.io-index"
351 330
 
352 331
 [[package]]
@@ -361,7 +340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
361 340
 dependencies = [
362 341
  "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
363 342
  "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
364
- "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)",
343
+ "syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
365 344
 ]
366 345
 
367 346
 [[package]]
@@ -392,17 +371,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
392 371
 
393 372
 [[package]]
394 373
 name = "syn"
395
-version = "1.0.17"
374
+version = "1.0.18"
396 375
 source = "registry+https://github.com/rust-lang/crates.io-index"
397 376
 dependencies = [
398 377
  "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
399
- "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
378
+ "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
400 379
  "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
401 380
 ]
402 381
 
382
+[[package]]
383
+name = "thiserror"
384
+version = "1.0.16"
385
+source = "registry+https://github.com/rust-lang/crates.io-index"
386
+dependencies = [
387
+ "thiserror-impl 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
388
+]
389
+
390
+[[package]]
391
+name = "thiserror-impl"
392
+version = "1.0.16"
393
+source = "registry+https://github.com/rust-lang/crates.io-index"
394
+dependencies = [
395
+ "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
396
+ "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
397
+ "syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
398
+]
399
+
400
+[[package]]
401
+name = "tinygfx"
402
+version = "0.1.0"
403
+source = "git+https://github.com/mgottschlag/tinygfx#6560a8e340ce288b9d3be0fad4933a9e22a74417"
404
+
405
+[[package]]
406
+name = "tinygfx-assets"
407
+version = "0.1.0"
408
+source = "git+https://github.com/mgottschlag/tinygfx#6560a8e340ce288b9d3be0fad4933a9e22a74417"
409
+dependencies = [
410
+ "freetype-rs 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
411
+ "lodepng 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
412
+ "thiserror 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
413
+]
414
+
403 415
 [[package]]
404 416
 name = "typenum"
405
-version = "1.11.2"
417
+version = "1.12.0"
406 418
 source = "registry+https://github.com/rust-lang/crates.io-index"
407 419
 
408 420
 [[package]]
@@ -415,11 +427,6 @@ name = "vcell"
415 427
 version = "0.1.2"
416 428
 source = "registry+https://github.com/rust-lang/crates.io-index"
417 429
 
418
-[[package]]
419
-name = "vcpkg"
420
-version = "0.2.8"
421
-source = "registry+https://github.com/rust-lang/crates.io-index"
422
-
423 430
 [[package]]
424 431
 name = "void"
425 432
 version = "1.0.2"
@@ -442,48 +449,49 @@ dependencies = [
442 449
 "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
443 450
 "checksum bme280 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bc93357f2a5603736e2c1f1ba8e18e9ec80efa7fdade5d6a37c11362b76363f4"
444 451
 "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
445
-"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
452
+"checksum cc 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)" = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d"
453
+"checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62"
446 454
 "checksum cortex-m 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2954942fbbdd49996704e6f048ce57567c3e1a4e2dc59b41ae9fde06a01fc763"
447 455
 "checksum cortex-m-rt 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "00d518da72bba39496024b62607c1d8e37bcece44b2536664f1132a73a499a28"
448 456
 "checksum cortex-m-rt-macros 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4717562afbba06e760d34451919f5c3bf3ac15c7bb897e8b04862a7428378647"
449 457
 "checksum cortex-m-rtfm 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eaf0b9fd3f042cb3793d15daf3cea201b2f25c99b0b5b936a551bb6909c3ae5b"
450 458
 "checksum cortex-m-rtfm-macros 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c62092f6ff344e9b0adb748f0302ed69889ba2fae1fce446e3788d4726ea73bb"
451 459
 "checksum cortex-m-semihosting 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "113ef0ecffee2b62b58f9380f4469099b30e9f9cbee2804771b4203ba1762cfa"
452
-"checksum embedded-epd 0.1.0 (git+https://github.com/mgottschlag/rust-embedded-epd)" = "<none>"
453 460
 "checksum embedded-graphics 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "40a69991ceb896bd4810a0cf2bcc46fc94b7860573c71f965d8e5b3d66942fed"
454 461
 "checksum embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee4908a155094da7723c2d60d617b820061e3b4efcc3d9e293d206a5a76c170b"
455 462
 "checksum embedded-nrf24l01 0.2.0 (git+https://github.com/astro/embedded-nrf24l01)" = "<none>"
456
-"checksum epd-assets 0.1.0 (git+https://github.com/mgottschlag/rust-epd-assets)" = "<none>"
457 463
 "checksum epd-waveshare 0.4.0 (git+https://github.com/mgottschlag/epd-waveshare.git?branch=streaming)" = "<none>"
458
-"checksum freetype-rs 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28cc92a7040ee7b631e4279e263f9a83aedc1eb6085c68d8ca4d072b5644e705"
459
-"checksum freetype-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9c8666cce7cf6e51a290623647febfbab92480b4c3e0f495cb9d4d312b5d38"
464
+"checksum freetype-rs 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "340519227cdc8f41c27b3840a02e32dac6102dc314aefe6189cfa355233c445f"
465
+"checksum freetype-sys 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d48ac0ce366dd47a115ec8e598d7c51b4a974fc52ded5e53a56b31f55f34f3ea"
460 466
 "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
461 467
 "checksum generic-array 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd"
462 468
 "checksum hash32 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d4041af86e63ac4298ce40e5cca669066e75b6f1aa3390fe2561ffa5e1d9f4cc"
463 469
 "checksum heapless 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ffa511365b12346c5fbe759d82f80d3aa70d9f1ba01955594f84a1a6bbab985"
464 470
 "checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292"
465
-"checksum libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0"
466
-"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
467
-"checksum lodepng 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "40ed9859b15e009b494528f32ad054c5baf67afabf3c05d27973ea151563d430"
471
+"checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005"
472
+"checksum lodepng 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b1237d003f81f68a886aa31fd31fc932da1344b5e81337cbd88783e672e2ff5"
468 473
 "checksum mkl25z4 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "91f9b185f1346b1fdc8337481e2fdf5f282d0e884e2c59e4ddea5328105017d7"
469 474
 "checksum mkl25z4-hal 0.1.0 (git+https://github.com/mgottschlag/mkl25z4-hal)" = "<none>"
470 475
 "checksum nb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b1411551beb3c11dedfb0a90a0fa256b47d28b9ec2cdff34c25a2fa59e45dbdc"
471 476
 "checksum panic-semihosting 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c03864ac862876c16a308f5286f4aa217f1a69ac45df87ad3cd2847f818a642c"
472 477
 "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
473 478
 "checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3"
474
-"checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
479
+"checksum quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7"
475 480
 "checksum r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
476
-"checksum rgb 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5ec4ab2cf0b27e111e266e161cf7f9efd20125a161190da1c0945c4a4408fef3"
481
+"checksum rgb 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "a85b83fd629b0ce765f45316774fa6aaa95947fd74c8e4bbf3c6d1e349701d95"
477 482
 "checksum rtfm-core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec893edb2aa5b70320b94896ffea22a7ebb1cf3f942bb67cd5b60a865a63493"
478 483
 "checksum rtfm-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4455e23c34df3d66454e7e218a4d76a7f83321d04a806be614463341cec4116e"
479 484
 "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
480 485
 "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
481 486
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
482 487
 "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
483
-"checksum syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03"
484
-"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9"
488
+"checksum syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213"
489
+"checksum thiserror 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60"
490
+"checksum thiserror-impl 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269"
491
+"checksum tinygfx 0.1.0 (git+https://github.com/mgottschlag/tinygfx)" = "<none>"
492
+"checksum tinygfx-assets 0.1.0 (git+https://github.com/mgottschlag/tinygfx)" = "<none>"
493
+"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
485 494
 "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
486 495
 "checksum vcell 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "876e32dcadfe563a4289e994f7cb391197f362b6315dc45e8ba4aa6f564a4b3c"
487
-"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168"
488 496
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
489 497
 "checksum volatile-register 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d67cb4616d99b940db1d6bd28844ff97108b498a6ca850e5b6191a532063286"

+ 2
- 2
display/firmware/Cargo.toml 파일 보기

@@ -20,17 +20,17 @@ cortex-m-semihosting = "0.3.5"
20 20
 mkl25z4-hal = { git = "https://github.com/mgottschlag/mkl25z4-hal" }
21 21
 embedded-hal = "0.2.3"
22 22
 nb = "0.1.2"
23
-embedded-epd = { git = "https://github.com/mgottschlag/rust-embedded-epd" }
24 23
 bme280 = "0.2.1"
25 24
 embedded-nrf24l01 = { git = "https://github.com/astro/embedded-nrf24l01" }
26 25
 epd-waveshare = { git = "https://github.com/mgottschlag/epd-waveshare.git", branch = "streaming" }
26
+tinygfx = { git = "https://github.com/mgottschlag/tinygfx" }
27 27
 
28 28
 [dependencies.void]
29 29
 default-features = false
30 30
 version = "1.0.2"
31 31
 
32 32
 [build-dependencies]
33
-epd-assets = { git = "https://github.com/mgottschlag/rust-epd-assets" }
33
+tinygfx-assets = { git = "https://github.com/mgottschlag/tinygfx" }
34 34
 
35 35
 [profile]
36 36
 [profile.release]

+ 4
- 4
display/firmware/build.rs 파일 보기

@@ -1,4 +1,4 @@
1
-extern crate epd_assets as assets;
1
+extern crate tinygfx_assets as assets;
2 2
 
3 3
 use std::env;
4 4
 use std::fs::File;
@@ -12,14 +12,14 @@ fn main() {
12 12
 
13 13
     let mut font = assets::Font::load("assets/Roboto-Regular.ttf").unwrap();
14 14
 
15
-    let epd_font = font.generate("ROBOTO_100", 100, " 0123456789:", "crate::epd");
15
+    let epd_font = font.generate("ROBOTO_100", 100, " 0123456789:", "::tinygfx");
16 16
     f.write_all(epd_font.as_bytes()).unwrap();
17 17
 
18 18
     let epd_font = font.generate(
19 19
         "ROBOTO_30",
20 20
         30,
21 21
         " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:.",
22
-        "crate::epd",
22
+        "::tinygfx",
23 23
     );
24 24
 
25 25
     f.write_all(epd_font.as_bytes()).unwrap();
@@ -28,7 +28,7 @@ fn main() {
28 28
 
29 29
     f.write_all(
30 30
         clock_image
31
-            .generate_bitmap("ALARM_CLOCK_36", "crate::epd")
31
+            .generate_bitmap("ALARM_CLOCK_36", "::tinygfx")
32 32
             .as_bytes(),
33 33
     )
34 34
     .unwrap();

+ 38
- 22
display/firmware/src/display.rs 파일 보기

@@ -1,8 +1,12 @@
1 1
 use embedded_hal::blocking::delay::DelayUs;
2 2
 use embedded_hal::digital::v2::OutputPin;
3
-use epd_waveshare::{epd4in2::*, prelude::*};
3
+use epd_waveshare::epd4in2::EPD4in2;
4
+use epd_waveshare::prelude::{DisplayStream, WaveshareDisplay};
4 5
 use mkl25z4_hal::time::CopyableMonoTimer;
6
+use tinygfx::color::BlackWhite::{self, Black, White};
7
+use tinygfx::{Frame, Rectangle, Renderer, Text};
5 8
 
9
+use super::assets::ROBOTO_30;
6 10
 use super::information::Information;
7 11
 use super::pins::{
8 12
     DisplayBmeSpi, DisplayBusy, DisplayCs, DisplayDc, DisplayPins, DisplayPwr, DisplayRst,
@@ -63,8 +67,18 @@ impl Display {
63 67
         self.epd.wake_up(spi, &mut time).ok();
64 68
 
65 69
         // TODO: Draw the display contents.
66
-        self.epd.set_background_color(Color::Black);
67
-        let checkerboard = Checkerboard::new(400, 300, true);
70
+        let r = Rectangle::new(10, 10, 100, 50, Black);
71
+        let t = Text::new(20, 100, "asdf", &ROBOTO_30, Black);
72
+        let mut frame = Frame::new(400, 300, |mut renderer| {
73
+            let clip = renderer.full_frame();
74
+            renderer.clear(White);
75
+            r.draw(clip, &mut renderer);
76
+            t.draw(clip, &mut renderer);
77
+        });
78
+        frame.mirror_x(true);
79
+        frame.mirror_y(true);
80
+        //self.epd.set_background_color(Color::Black);
81
+        let checkerboard = TinyGfxStream::new(frame);
68 82
         self.epd.update_frame_stream(spi, checkerboard).unwrap();
69 83
         self.epd.display_frame(spi).unwrap();
70 84
 
@@ -73,34 +87,36 @@ impl Display {
73 87
     }
74 88
 }
75 89
 
76
-struct Checkerboard {
77
-    width: usize,
78
-    height: usize,
79
-    index: usize,
80
-    buffer: [u8; 1],
90
+struct TinyGfxStream<Draw> {
91
+    frame: Frame<Draw, BlackWhite>,
92
+    buffer: [u8; 400 / 8],
93
+    row: u32,
81 94
 }
82 95
 
83
-impl Checkerboard {
84
-    fn new(width: usize, height: usize, start_black: bool) -> Self {
96
+impl<Draw> TinyGfxStream<Draw>
97
+where
98
+    Draw: Fn(Renderer<BlackWhite>),
99
+{
100
+    fn new(frame: Frame<Draw, BlackWhite>) -> Self {
85 101
         Self {
86
-            width: width / 8,
87
-            height,
88
-            index: 0,
89
-            buffer: [if start_black { 0x55 } else { 0xaa }],
102
+            frame,
103
+            buffer: [0u8; 400 / 8],
104
+            row: 0,
90 105
         }
91 106
     }
92 107
 }
93 108
 
94
-impl DisplayStream for Checkerboard {
109
+impl<Draw> DisplayStream for TinyGfxStream<Draw>
110
+where
111
+    Draw: Fn(Renderer<BlackWhite>),
112
+{
95 113
     fn next<'a>(&'a mut self) -> Option<&'a [u8]> {
96
-        if self.index != self.width * self.height {
97
-            self.index += 1;
98
-            if (self.index - 1) % self.width == 0 {
99
-                self.buffer[0] = !self.buffer[0];
100
-            }
101
-            Some(&self.buffer)
102
-        } else {
114
+        if self.row == self.frame.height() {
103 115
             None
116
+        } else {
117
+            self.frame.draw_row(self.row, &mut self.buffer);
118
+            self.row += 1;
119
+            Some(&self.buffer)
104 120
         }
105 121
     }
106 122
 }

+ 0
- 1
display/firmware/src/main.rs 파일 보기

@@ -11,7 +11,6 @@ mod assets {
11 11
     include!(concat!(env!("OUT_DIR"), "/assets.rs"));
12 12
 }
13 13
 
14
-use embedded_epd as epd;
15 14
 use mkl25z4_hal::clocks::ClockConfiguration;
16 15
 use mkl25z4_hal::time::{CopyableMonoTimer, NonCopyableMonoTimer, U32Ext};
17 16
 use panic_semihosting as _;

Loading…
취소
저장