mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-13 00:07:12 +00:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
commit
d91e390690
16 changed files with 349 additions and 230 deletions
|
@ -1,6 +1,5 @@
|
|||
#include <furi.h>
|
||||
#include <gui/gui.h>
|
||||
#include <gui/canvas_i.h>
|
||||
#include <input/input.h>
|
||||
|
||||
#define BUFFER_SIZE (32U)
|
||||
|
@ -42,10 +41,11 @@ static DirectDraw* direct_draw_alloc(void) {
|
|||
static void direct_draw_free(DirectDraw* instance) {
|
||||
furi_pubsub_unsubscribe(instance->input, instance->input_subscription);
|
||||
|
||||
instance->canvas = NULL;
|
||||
gui_direct_draw_release(instance->gui);
|
||||
furi_record_close(RECORD_GUI);
|
||||
furi_record_close(RECORD_INPUT_EVENTS);
|
||||
|
||||
free(instance);
|
||||
}
|
||||
|
||||
static void direct_draw_block(Canvas* canvas, uint32_t size, uint32_t counter) {
|
||||
|
|
Binary file not shown.
|
@ -991,31 +991,31 @@ type: raw
|
|||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3302 1639 405 423 407 420 410 1234 405 421 409 1210 440 387 432 420 410 417 413 1231 408 1238 412 388 431 422 408 392 438 1233 406 1238 412 389 430 396 434 419 411 390 440 413 406 394 436 391 439 388 431 421 409 417 413 414 405 421 409 392 438 1233 406 421 409 417 413 414 405 395 435 418 412 388 432 421 409 1236 414 387 432 420 410 390 440 388 431 1213 437 1208 431 1239 411 1234 405 1213 437 1208 431 1214 436 1235 415 386 433 420 410 1234 405 422 408 418 412 389 431 396 434 1211 439 388 432 422 408 418 412 1233 406 1238 412 415 404 422 408 1237 413 388 432 422 408 1236 414 1205 434 1210 440 1205 434 392 438 390 440 1231 408 392 438 415 404 396 434 392 438 415 404 422 408 419 411 416 414 412 407 394 436 417 413 414 405 421 409 417 413 1232 407 419 411 390 440 1204 435 418 412 415 415 412 407 419 411 1208 431 421 409 418 412 388 432 421 409 392 438 415 404 395 435 1211 439 388 432 1213 437 416 414 386 433 1212 438 415 404 396 434 392 438 416 414 413 406 420 410 417 413 1231 409 418 412 389 430 1240 410 391 439 1205 434 420 410 390 440 387 432 420 410 417 413
|
||||
#
|
||||
#
|
||||
name: Cool_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3293 1649 405 396 434 419 411 1207 432 395 435 1236 414 413 406 394 436 417 413 1232 407 1212 438 415 404 396 434 419 411 1234 405 1239 411 417 413 414 405 421 409 419 411 389 430 423 407 393 437 416 414 387 432 394 436 417 413 388 431 421 409 1236 414 387 432 421 409 418 412 414 405 422 408 418 412 415 404 1240 410 391 439 414 405 421 409 419 411 1234 405 1239 411 1208 431 1239 411 1235 404 1214 436 1210 440 1205 434 419 411 416 414 1204 435 418 412 415 404 396 434 393 437 1235 404 396 434 420 410 416 414 1231 408 1210 440 387 432 421 409 1235 415 414 405 395 435 418 412 1232 407 420 410 1208 431 422 408 1237 413 415 404 396 434 419 411 416 414 413 406 420 410 417 413 414 405 421 409 418 412 415 404 422 408 419 411 416 414 413 406 1238 412 415 404 422 408 1237 413 414 405 421 409 418 412 416 414 1231 408 418 412 415 404 422 408 419 411 416 414 413 406 420 410 1235 404 423 407 420 410 1234 405 422 408 1210 440 414 405 421 409 392 438 415 404 422 408 420 410 417 413 1231 408 419 411 416 414 413 406 1237 413 415 404 1239 411 417 413 1232 407 420 410 417 413
|
||||
#
|
||||
#
|
||||
name: Cool_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3302 1614 440 414 405 421 409 1235 414 413 406 1238 411 415 404 422 408 419 411 1234 405 1240 409 418 412 415 404 422 408 1237 412 1232 407 420 410 417 413 414 405 422 408 419 411 416 414 413 406 420 410 417 413 414 405 421 409 418 412 415 404 1239 410 418 412 415 404 422 408 419 411 416 414 413 406 420 410 1234 405 422 408 419 411 416 414 414 405 1239 411 1207 432 1239 410 1235 414 1230 409 1236 413 1232 407 1237 412 415 415 412 407 1237 412 414 405 422 408 419 411 416 414 1231 408 419 411 416 414 413 406 1238 411 1206 433 421 409 418 412 1206 433 421 409 418 412 1206 433 1238 412 1207 432 1213 436 390 440 1232 407 420 410 417 413 414 405 421 409 418 412 415 404 422 408 419 411 416 414 413 406 421 409 418 412 415 404 422 408 419 411 1233 406 421 409 418 412 1232 407 420 410 418 412 389 430 422 408 1210 440 414 405 395 435 418 412 415 404 423 407 420 410 416 414 414 405 422 408 418 412 415 404 1240 409 1235 414 413 406 420 410 417 413 414 405 422 408 419 411 416 414 1231 408 418 412 415 404 1240 409 1209 440 387 432 1212 437 1234 405 1214 435 1209 440 1204 435
|
||||
#
|
||||
#
|
||||
name: Heat_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3301 1615 439 415 404 422 408 1210 439 414 405 1239 410 416 414 414 405 395 435 1209 440 1205 434 419 411 417 413 414 405 1212 437 1207 432 422 408 419 411 416 414 414 405 421 409 418 412 415 404 422 408 393 437 416 414 413 406 420 410 417 413 1205 434 420 410 417 413 414 405 421 409 418 412 415 404 422 408 1210 439 414 405 422 408 419 411 417 413 1205 434 1236 413 1206 433 1211 438 1207 432 1212 437 1209 440 1204 435 418 412 415 415 1204 435 418 412 415 404 422 408 419 411 1208 441 412 407 420 410 417 413 1205 434 1237 412 414 405 422 408 1210 439 415 404 396 434 419 411 1207 432 1213 436 417 413 1205 434 420 410 417 413 1231 408 419 411 416 414 413 406 421 409 418 412 414 405 422 408 419 411 415 404 424 406 421 409 418 412 415 404 1239 410 417 413 414 405 1239 410 416 414 413 406 422 408 419 411 1233 406 421 409 418 412 415 404 423 407 419 411 416 414 413 406 1238 411 416 414 413 406 421 409 1235 414 1230 409 418 412 415 415 412 407 420 410 417 413 414 405 422 408 1236 413 413 406 421 409 1235 414 1204 435 1210 439 1206 433 1212 437 1207 432 395 435 1236 413
|
||||
#
|
||||
#
|
||||
name: Heat_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3295 1646 408 420 410 390 440 1205 434 393 437 1234 405 421 409 419 411 415 415 1230 409 1210 440 414 405 421 409 418 412 1233 406 1212 437 416 414 413 406 394 436 418 412 415 404 422 408 393 437 416 414 413 406 420 410 417 413 414 405 421 409 1236 413 414 405 421 409 418 412 415 404 423 407 419 411 416 414 1231 408 418 412 415 415 412 407 421 409 1235 414 1204 435 1209 441 1205 434 1210 440 1205 434 1212 437 1207 432 395 435 419 411 1233 406 421 409 418 412 415 404 422 408 1238 411 415 404 396 434 419 411 1234 405 1239 410 417 413 414 405 1213 436 417 413 414 405 1213 436 1235 404 1214 435 1209 441 413 406 421 409 418 412 1206 433 394 436 418 412 388 431 422 408 419 411 415 415 386 433 420 410 418 412 414 405 422 408 419 411 389 430 1241 408 418 412 415 404 1240 409 417 413 414 405 395 435 419 411 1233 406 395 435 418 412 415 404 422 408 419 411 416 414 413 406 421 409 1236 413 413 406 394 436 1235 414 1230 409 418 412 415 404 422 408 420 410 417 413 414 405 421 409 1236 413 413 406 420 410 417 413 1232 407 1237 412 416 414 1230 409 1236 413 1205 434 1210 439
|
||||
#
|
||||
#
|
||||
name: Off
|
||||
type: raw
|
||||
frequency: 38000
|
||||
|
@ -1029,25 +1029,25 @@ type: raw
|
|||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4349 4437 549 1615 551 1614 551 1614 551 1617 549 531 550 530 551 1615 550 531 550 532 549 530 551 531 550 530 551 1615 550 1614 551 531 550 1615 551 529 552 531 550 530 551 533 548 530 551 530 551 1616 549 1615 550 1616 550 1615 550 1614 551 1616 550 1615 551 1615 550 531 550 531 550 530 551 529 552 530 551 530 551 529 552 530 551 531 550 1615 550 532 549 1615 550 1616 550 531 550 531 550 530 551 530 551 529 552 532 549 530 551 530 551 531 550 529 552 531 550 1615 551 530 551 530 551 530 551 531 550 530 551 531 550 530 551 531 550 531 550 531 550 1616 550 1618 547 532 549 529 552 530 551 1615 551 1615 550 5379 4350 4436 550 1616 549 1615 551 1614 552 1615 550 529 552 530 551 1614 552 530 551 529 552 531 550 531 550 531 550 1614 552 1614 551 530 551 1615 550 530 551 530 551 530 551 530 551 531 550 532 549 1616 549 1615 551 1614 552 1615 550 1614 551 1616 550 1614 552 1615 550 529 552 530 551 530 551 530 551 531 550 531 550 530 551 530 551 531 550 1615 550 530 551 1615 550 1615 551 530 551 530 551 530 551 530 551 530 551 530 551 529 552 530 551 531 550 532 549 530 551 1615 551 531 550 530 551 530 551 530 551 530 551 531 550 531 550 531 550 530 551 531 550 1615 551 1615 551 532 549 531 550 531 550 1616 549 1614 552
|
||||
#
|
||||
#
|
||||
name: Cool_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4350 4438 549 1615 551 1614 552 1616 549 1616 550 530 551 531 550 1615 551 530 551 529 552 531 550 530 551 531 550 1614 551 1616 550 531 550 1616 549 530 551 531 550 530 551 529 552 530 551 531 550 1616 549 1616 550 1616 549 1616 550 1615 551 1614 551 1614 552 1615 551 530 551 531 550 530 551 531 550 531 550 529 552 532 549 531 550 530 551 1613 552 530 551 531 550 529 552 532 549 530 551 530 551 531 550 531 550 530 551 530 551 530 551 531 550 530 551 531 550 531 550 1615 551 529 552 530 551 530 551 530 551 530 551 530 551 530 551 530 551 532 549 531 550 531 550 532 549 531 550 531 550 530 551 530 551 5132 4351 4435 552 1616 550 1615 550 1615 551 1613 553 531 550 530 551 1615 550 530 551 531 550 531 550 530 551 532 549 1616 550 1616 549 530 551 1615 551 530 551 531 550 530 551 530 551 530 551 531 550 1615 551 1615 551 1614 551 1615 550 1615 551 1615 550 1615 550 1616 550 530 551 530 551 531 550 532 549 530 551 530 551 531 550 531 550 531 550 1615 550 530 551 530 551 530 551 529 552 531 550 530 551 531 550 531 550 530 551 530 551 531 550 530 551 530 551 530 551 531 550 1616 550 530 551 529 552 530 551 531 550 532 549 530 551 530 551 529 552 531 550 529 552 530 551 530 551 531 550 531 550 529 552 531 550
|
||||
#
|
||||
#
|
||||
name: Cool_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4350 4436 550 1617 549 1615 550 1615 550 1617 548 530 551 531 550 1615 551 531 550 531 550 530 551 530 551 531 550 1614 552 1615 550 530 551 1614 551 531 550 531 550 531 550 529 552 532 549 530 551 1617 549 1616 549 1615 551 1619 547 1615 550 1615 550 1616 549 1616 550 530 551 531 550 530 551 530 551 531 550 530 551 529 552 529 552 530 551 1617 548 533 548 1615 551 1613 552 530 551 531 550 531 550 530 551 530 551 532 549 531 550 531 550 530 551 531 550 531 550 531 550 1615 551 531 550 531 550 532 549 531 550 530 551 531 550 533 548 531 550 530 551 1617 548 1616 549 530 551 531 550 532 549 532 549 532 549 5200 4349 4436 550 1615 551 1615 551 1615 550 1616 550 531 550 530 551 1615 551 531 550 530 551 530 551 530 551 530 551 1616 549 1615 551 530 551 1615 551 531 550 531 550 530 551 531 550 531 550 531 550 1615 551 1616 550 1616 550 1615 550 1617 548 1616 549 1616 550 1615 550 531 550 530 551 531 550 531 550 532 549 530 551 531 550 531 550 532 549 1616 550 531 550 1616 550 1615 550 531 550 530 551 531 550 531 550 531 550 531 550 531 550 532 549 532 549 531 550 532 549 531 550 1616 550 531 550 530 551 532 549 532 549 530 551 532 549 531 550 532 549 531 550 1616 549 1617 549 531 550 530 551 531 550 532 549 532 549
|
||||
#
|
||||
#
|
||||
name: Heat_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4350 4437 547 1618 548 1620 546 1620 546 1619 547 534 547 535 546 1619 547 534 547 536 545 536 545 535 546 535 546 1619 547 1620 545 534 523 1644 546 535 522 559 546 535 546 534 547 535 546 535 545 1620 546 1620 546 1620 546 1619 547 1619 546 1619 547 1620 545 1620 546 535 546 534 547 537 520 558 523 558 547 534 547 536 521 559 522 559 522 1644 546 535 546 535 522 560 545 536 521 559 522 559 522 558 523 559 522 560 521 559 522 559 522 560 521 559 522 561 520 1644 521 1645 520 559 522 559 522 559 522 559 522 559 522 560 521 560 521 560 521 561 520 559 522 560 521 559 522 559 522 559 522 1644 522 559 522 5341 4349 4439 520 1645 521 1645 521 1646 519 1645 521 560 521 561 520 1645 521 560 521 560 521 559 522 560 521 561 520 1646 520 1645 521 561 520 1645 521 561 520 560 521 560 521 560 521 560 521 561 520 1644 522 1644 522 1645 520 1645 521 1645 521 1645 520 1646 520 1644 522 561 520 560 521 560 521 561 520 560 521 561 520 561 520 561 520 560 521 1646 520 562 519 561 520 561 520 562 519 560 521 560 521 561 520 561 520 560 521 560 521 561 520 560 521 560 521 562 519 1646 520 1645 521 561 520 561 520 561 520 560 521 560 521 561 520 560 521 559 522 560 521 561 520 561 520 560 521 562 519 559 522 1645 521 561 520
|
||||
#
|
||||
#
|
||||
name: Heat_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
|
@ -1061,33 +1061,79 @@ type: raw
|
|||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4387 4398 547 1609 547 530 547 1610 547 1611 545 530 547 530 547 1608 547 530 548 530 547 1611 545 532 546 532 547 1609 547 1610 547 531 547 1608 548 530 547 530 548 530 547 1610 546 1609 547 1610 547 1609 547 1609 547 1611 545 1609 548 1610 546 530 547 530 548 529 549 531 547 531 546 531 547 1608 548 1610 547 1608 548 533 545 1608 548 532 546 532 546 1611 545 532 547 532 545 530 548 1608 547 530 549 1608 547 1609 548 5203 4386 4398 547 1609 546 530 547 1609 546 1607 548 531 547 531 547 1609 547 530 548 531 547 1609 547 531 547 531 547 1608 547 1613 544 531 546 1609 547 531 547 531 547 532 546 1609 547 1609 546 1609 547 1609 547 1608 547 1608 548 1608 548 1609 547 530 547 530 547 530 547 532 546 530 547 530 548 1610 546 1608 547 1609 547 530 547 1609 547 530 547 530 548 1609 546 530 548 530 547 532 546 1610 546 531 546 1608 548 1608 548
|
||||
#
|
||||
#
|
||||
name: Cool_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4388 4398 547 1608 548 531 546 1610 546 1609 547 530 547 529 548 1608 548 532 547 530 548 1612 544 529 549 530 548 1608 547 1609 547 531 546 1608 548 1607 549 529 549 1608 549 1609 548 1608 548 1608 548 1611 545 1608 548 530 548 1609 547 531 547 530 548 530 548 531 547 529 549 530 548 530 547 531 547 530 548 530 547 529 549 530 548 532 547 530 548 1609 547 1610 547 1608 548 1609 547 1608 548 1608 548 1608 548 1608 548 5203 4388 4396 549 1609 547 529 549 1610 546 1608 548 529 549 530 547 1609 547 530 548 529 549 1608 548 531 547 532 546 1609 547 1609 547 530 548 1609 548 1609 548 529 548 1608 548 1609 548 1609 547 1609 547 1608 548 1609 547 532 546 1608 548 531 548 531 548 530 548 530 548 531 547 530 548 531 548 531 547 530 548 530 548 530 548 531 547 529 549 529 549 1609 548 1608 548 1609 547 1608 548 1608 548 1608 548 1607 549 1607 549
|
||||
#
|
||||
#
|
||||
name: Cool_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4384 4400 572 1585 571 505 572 1583 573 1584 572 508 570 503 575 1584 572 505 572 506 572 1583 573 504 573 506 571 1586 570 1585 572 532 546 1586 570 1585 571 506 571 1585 571 1583 573 1586 570 1583 573 1584 572 1589 569 505 572 1585 571 506 571 506 573 506 572 505 573 532 545 504 574 509 570 1611 545 506 572 1582 574 506 572 507 571 507 571 507 570 1584 572 507 571 1587 569 506 572 1584 572 1585 571 1583 573 1612 544 5179 4386 4400 570 1584 572 507 571 1583 572 1585 571 506 572 506 572 1584 572 505 572 504 574 1584 572 507 571 504 574 1583 573 1585 572 507 571 1584 572 1610 545 508 571 1587 569 1583 573 1583 573 1585 571 1585 572 1585 572 505 572 1584 572 505 573 507 572 506 571 504 574 505 573 505 574 508 571 1585 571 507 571 1585 571 506 571 506 572 504 574 505 572 1586 570 507 571 1586 570 505 573 1584 572 1585 571 1587 569 1584 573
|
||||
#
|
||||
#
|
||||
name: Heat_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4386 4398 575 1582 574 503 575 1583 573 1582 574 505 573 504 574 1582 574 506 572 508 570 1583 573 504 574 505 573 1583 573 1584 573 505 573 1582 575 1583 574 504 574 1582 574 1583 573 1583 573 1583 573 1585 571 1586 572 504 573 1584 572 504 573 505 573 505 573 505 573 504 573 506 571 1583 574 505 573 1583 573 1583 573 1584 572 1583 573 505 572 505 573 504 574 1583 574 505 573 505 573 504 574 505 572 1584 572 1584 573 5178 4387 4400 571 1583 573 504 574 1584 572 1584 572 507 572 504 574 1582 574 505 572 505 573 1583 573 504 574 504 574 1582 574 1584 573 503 574 1583 573 1582 574 505 573 1583 573 1582 575 1583 573 1610 546 1584 572 1583 573 505 573 1610 546 506 572 505 573 504 574 504 574 505 573 505 573 1584 573 505 573 1582 574 1584 572 1583 573 1583 573 504 574 503 575 504 574 1585 571 507 571 504 573 506 572 505 572 1584 572 1585 571
|
||||
#
|
||||
#
|
||||
name: Heat_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4388 4399 547 1608 548 530 548 1610 547 1610 547 529 549 529 548 1608 548 530 548 530 548 1607 549 533 545 531 548 1608 548 1610 546 531 547 1609 547 1608 548 529 549 1609 547 1609 547 1609 547 1609 547 1609 547 1608 548 529 548 1638 519 530 548 530 548 530 548 529 550 528 549 530 548 530 548 1608 548 530 548 1609 548 1610 547 1609 547 531 546 529 549 1608 548 530 548 1609 548 530 548 529 548 530 548 1609 548 1609 548 5205 4387 4398 547 1609 548 531 546 1609 547 1609 547 530 548 531 546 1609 547 531 548 530 573 1583 573 507 571 506 572 1583 573 1582 574 504 574 1581 575 1582 574 506 572 1583 574 1583 573 1583 573 1585 571 1584 572 1585 570 507 571 1582 574 505 574 532 545 505 573 505 572 506 571 505 573 505 573 1584 572 506 572 1583 573 1584 572 1583 573 505 572 504 573 1583 573 505 573 1586 571 506 572 505 573 507 572 1583 573 1584 572
|
||||
#
|
||||
#
|
||||
name: Off
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4388 4399 572 1583 573 532 546 1585 571 1583 574 503 575 505 573 1584 572 504 574 505 573 1584 573 506 572 504 573 1584 573 1584 572 505 574 1611 545 506 573 1583 573 1585 571 1586 545 1609 547 531 547 1611 545 1608 548 1607 549 530 548 529 548 531 548 532 546 1610 546 533 545 530 547 1609 547 1610 547 1609 547 533 545 529 548 530 548 530 547 531 546 530 547 530 548 533 544 1608 548 1608 548 1610 546 1606 550 1609 547 5203 4388 4397 548 1609 547 531 547 1608 548 1608 548 530 548 530 548 1608 548 531 547 531 547 1610 546 531 547 530 548 1609 547 1611 546 532 547 1609 547 531 547 1608 548 1610 546 1609 547 1608 548 530 547 1609 547 1608 548 1609 547 531 546 530 548 530 547 530 547 1608 548 532 547 534 545 1608 548 1608 548 1609 547 530 548 531 547 531 547 532 546 531 546 531 547 532 546 530 548 1608 547 1608 548 1610 546 1608 548 1608 548
|
||||
data: 4388 4399 572 1583 573 532 546 1585 571 1583 574 503 575 505 573 1584 572 504 574 505 573 1584 573 506 572 504 573 1584 573 1584 572 505 574 1611 545 506 573 1583 573 1585 571 1586 545 1609 547 531 547 1611 545 1608 548 1607 549 530 548 529 548 531 548 532 546 1610 546 533 545 530 547 1609 547 1610 547 1609 547 533 545 529 548 530 548 530 547 531 546 530 547 530 548 533 544 1608 548 1608 548 1610 546 1606 550 1609 547 5203 4388 4397 548 1609 547 531 547 1608 548 1608 548 530 548 530 548 1608 548 531 547 531 547 1610 546 531 547 530 548 1609 547 1611 546 532 547 1609 547 531 547 1608 548 1610 546 1609 547 1608 548 530 547 1609 547 1608 548 1609 547 531 546 530 548 530 547 530 547 1608 548 532 547 534 545 1608 548 1608 548 1609 547 530 548 531 547 531 547 532 546 531 546 531 547 532 546 530 548 1608 547 1608 548 1610 546 1608 548 1608 548
|
||||
#
|
||||
# Model: Panasonic CS-E9HKR
|
||||
#
|
||||
name: Dh
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3466 1748 445 367 502 1292 444 422 444 420 445 422 443 420 445 421 445 420 445 363 503 420 445 422 444 420 445 424 445 1292 445 421 445 451 414 421 444 421 444 421 445 422 443 423 446 1292 443 1292 445 1292 445 421 497 372 444 1293 445 420 445 421 444 421 444 421 445 421 444 421 444 420 445 422 444 420 445 421 444 421 444 421 445 422 443 356 509 420 445 421 445 429 436 421 444 421 444 414 452 420 445 421 444 421 444 423 443 421 444 421 444 421 444 423 443 420 445 424 445 1291 444 1294 444 421 444 421 444 421 444 422 444 423 445 9989 3463 1752 444 424 445 1293 443 422 444 392 473 421 444 416 449 423 443 421 444 421 444 421 444 423 443 422 443 425 444 1292 444 423 443 422 443 419 446 421 444 423 443 421 444 426 443 1292 444 1294 443 1294 443 421 444 425 444 1294 444 422 443 421 444 422 443 424 442 421 444 421 444 421 444 423 444 421 444 422 443 421 444 423 443 425 444 1293 444 421 444 421 444 1293 444 423 446 1292 445 321 546 421 444 421 444 385 480 423 443 425 444 1291 445 1293 443 422 445 422 443 421 444 421 496 370 444 422 443 421 496 370 443 421 444 1291 497 1239 444 1284 504 1237 447 1293 444 425 444 1293 496 371 494 1241 495 370 496 369 497 297 517 421 496 370 495 369 496 370 496 370 495 370 495 369 496 372 494 370 495 369 496 370 495 370 496 370 495 373 495 1240 495 1241 495 1240 497 369 496 371 494 371 443 422 496 369 496 368 497 370 496 369 496 372 497 1239 496 1241 496 1241 496 370 495 310 555 371 495 371 494 368 497 370 495 370 496 361 504 370 495 369 496 372 494 372 494 369 496 371 494 371 495 373 495 1240 497 370 495 371 495 370 495 369 496 370 495 370 495 1242 495 373 492 370 495 366 500 369 496 371 495 370 495 371 495 369 496 371 494 370 495 371 495 371 494 371 494 370 495 372 494 380 488 1241 496 374 495 1241 495 1240 495 1240 495 1241 495 1242 494 1244 494
|
||||
#
|
||||
name: Cool_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3467 1751 442 425 444 1294 443 424 442 422 443 423 442 422 443 422 444 421 444 421 444 424 441 423 443 421 444 425 444 1294 443 424 442 423 442 422 443 425 440 423 443 423 442 427 442 1292 443 1322 415 1293 444 422 443 425 443 1295 443 424 441 421 444 423 442 424 442 425 440 423 442 423 442 424 442 292 573 421 444 423 442 422 444 422 443 422 443 423 442 425 441 423 442 425 440 421 444 424 442 422 443 422 443 422 443 424 442 422 443 422 443 422 443 424 442 421 444 426 443 1292 443 1294 444 423 442 422 443 423 442 424 442 426 442 9989 3465 1753 442 425 444 1292 445 424 442 424 441 421 444 422 443 422 444 423 442 423 442 352 513 423 443 423 442 425 443 1296 441 423 443 422 443 422 443 424 441 423 443 422 443 427 442 1293 442 1322 415 1293 444 421 444 425 443 1294 444 422 443 422 443 421 444 425 441 423 442 422 443 421 444 423 443 421 444 422 443 422 443 424 442 425 444 1261 475 422 443 422 443 1292 444 1293 442 1295 441 424 442 422 443 422 443 427 442 1322 415 1292 444 1292 444 1294 442 423 443 422 443 421 444 422 443 423 443 421 444 421 444 423 442 421 444 1291 444 1293 443 1294 442 1195 541 1293 444 425 443 1293 443 422 444 1322 414 421 444 422 443 423 443 422 443 423 442 422 443 425 441 422 443 422 443 423 442 423 443 422 443 422 443 421 444 423 444 421 444 424 444 1292 444 1293 444 1294 442 422 443 421 444 423 443 422 443 421 444 422 443 424 442 421 444 426 443 1291 444 1293 443 1293 444 422 443 421 444 422 444 421 444 422 443 421 444 423 443 423 442 421 444 422 443 423 444 421 444 421 444 421 444 422 444 425 444 1294 443 422 443 423 444 424 441 422 443 422 443 422 443 1294 443 422 443 421 444 424 442 421 444 413 452 421 444 423 443 421 444 422 443 422 443 422 444 421 444 422 443 422 443 423 443 426 443 1294 442 421 444 423 442 1293 443 1293 443 421 444 422 444 362 505
|
||||
#
|
||||
name: Cool_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3467 1751 444 424 444 1291 446 422 444 420 445 420 445 419 446 421 445 378 487 421 444 420 445 420 446 421 444 423 446 1321 415 451 415 420 445 420 445 419 446 421 445 419 446 422 447 1290 445 1291 445 1291 446 420 445 424 445 1293 445 420 445 420 445 420 445 421 445 420 445 420 445 419 446 421 445 420 445 421 444 420 445 421 445 420 445 420 445 420 445 421 445 419 446 420 445 420 445 420 446 420 445 421 444 419 446 422 444 420 445 420 445 421 444 421 445 421 444 424 445 1290 445 1292 446 420 445 421 444 420 445 423 443 424 444 9988 3465 1751 446 423 445 1291 446 421 445 420 445 420 445 420 445 422 444 420 445 420 445 421 444 421 446 421 444 424 445 1291 446 421 445 421 444 420 445 420 445 420 446 421 444 423 446 1291 444 1293 444 1292 445 420 445 423 446 1294 444 419 446 420 445 421 444 422 444 420 445 421 444 420 445 421 445 421 444 420 445 420 445 422 444 421 444 420 445 420 445 421 444 1320 415 1291 445 1292 444 422 444 420 445 419 446 420 445 421 445 421 444 424 445 1291 446 421 445 420 445 420 445 421 444 421 445 421 444 421 444 420 445 420 445 1291 445 1292 443 1290 445 1291 446 1292 445 424 444 1293 444 421 444 1292 445 422 443 421 444 381 485 420 445 420 445 420 445 422 444 421 444 420 445 421 444 421 445 421 444 421 444 420 445 421 445 421 444 424 445 1291 444 1292 445 1291 446 420 445 419 446 422 444 421 444 420 445 420 445 421 445 420 445 423 446 1291 444 1291 446 1292 445 420 445 420 445 422 444 420 445 420 445 420 445 422 444 421 444 420 445 419 446 420 446 420 445 419 446 419 446 421 445 423 445 1293 444 419 446 421 445 420 445 419 446 420 445 420 445 1292 445 420 445 420 445 421 445 420 445 419 446 419 446 420 446 419 446 420 445 420 445 420 446 420 445 420 445 420 445 421 445 419 446 420 445 423 446 1292 445 1290 445 1290 445 1292 444 1291 445 1293 445
|
||||
#
|
||||
name: Heat_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3463 1751 443 424 445 1293 443 422 444 420 445 421 444 421 444 422 444 421 444 421 444 421 444 353 513 422 443 425 444 1293 444 422 444 421 444 420 445 421 444 422 444 421 444 425 444 1291 444 1294 443 1293 444 421 444 424 445 1294 444 420 445 421 444 416 449 422 444 421 444 421 444 421 444 422 444 420 445 421 444 422 443 422 444 421 444 421 444 420 445 373 493 420 445 421 444 420 445 422 444 420 445 422 443 421 444 422 444 421 444 421 444 422 443 421 445 421 444 424 445 1291 444 1294 444 421 444 420 445 420 445 422 444 424 444 9991 3463 1751 445 425 444 1293 444 422 444 421 444 420 445 421 444 423 443 421 444 421 444 421 444 422 444 421 444 424 445 1293 444 422 444 420 445 422 443 421 444 424 442 421 444 425 444 1292 443 1292 445 1292 445 421 444 424 445 1293 445 421 444 421 444 421 444 422 444 421 444 421 444 422 443 422 444 423 442 421 444 423 442 423 443 425 443 1293 444 423 442 421 444 1292 444 422 443 425 443 1295 443 421 444 368 549 373 443 1293 496 1240 495 1240 495 1241 496 371 495 370 495 370 495 370 495 371 495 370 495 369 496 371 494 371 494 1240 442 1293 495 1240 496 1241 496 1240 497 373 496 1241 496 371 494 1184 553 370 495 370 495 370 496 370 443 423 494 370 443 424 495 370 442 423 442 422 443 424 442 423 442 423 442 425 440 424 442 424 441 427 442 1294 441 1294 443 1294 443 424 441 423 442 425 442 421 444 423 442 424 441 425 441 424 441 426 443 1293 442 1295 442 1295 441 424 441 394 471 425 441 423 442 423 442 424 441 424 442 424 441 423 442 423 442 424 442 423 442 424 441 423 442 424 442 428 440 1295 442 424 441 425 441 424 441 424 441 423 442 424 441 1294 443 424 441 424 441 424 442 423 442 423 442 423 442 425 441 424 441 424 441 424 441 424 442 424 441 449 416 423 442 424 442 427 442 1295 442 424 441 424 441 1295 442 427 442 1295 441 425 441 426 441
|
||||
#
|
||||
name: Heat_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3461 1753 439 429 440 1298 439 427 439 426 439 426 439 426 439 427 439 426 439 426 439 426 439 427 439 426 439 430 438 1298 438 428 438 426 439 427 438 427 438 427 439 427 438 430 414 1321 439 1299 413 1323 414 451 414 455 414 1324 414 452 413 451 414 453 413 436 430 452 413 452 413 451 414 453 413 452 413 451 414 452 413 454 412 452 413 452 413 452 413 453 413 452 413 452 413 452 413 454 413 453 412 452 413 452 413 453 413 452 413 452 413 452 413 453 413 452 413 456 412 1323 412 1325 413 452 413 453 412 453 412 454 412 455 390 10044 3438 1779 412 457 412 1324 413 454 412 453 412 453 412 453 412 454 412 453 412 453 412 454 411 455 411 453 412 457 389 1347 390 477 389 476 389 476 389 476 389 402 465 475 390 479 390 1346 389 1348 389 1347 390 476 389 479 390 1348 390 476 389 476 389 476 389 477 389 475 390 476 389 476 389 477 389 476 389 476 389 476 389 478 388 480 389 1347 390 475 390 476 389 1347 390 476 389 479 389 1349 389 476 389 476 389 476 389 477 389 476 389 479 390 1348 389 477 389 476 389 476 389 476 389 476 390 476 389 476 389 476 389 476 389 1346 389 1347 389 1346 389 1347 390 1346 390 479 390 1347 390 476 389 1374 363 474 415 454 388 480 386 475 414 454 387 474 391 476 414 455 387 473 392 476 414 453 389 476 389 475 390 475 390 476 390 476 390 479 389 1346 389 1347 390 1348 389 476 389 476 389 477 389 476 389 476 389 475 390 477 389 440 425 479 389 1345 390 1347 390 1347 390 476 389 475 390 477 389 476 389 476 389 476 389 477 389 476 389 476 389 475 390 477 389 476 389 476 389 476 389 477 389 479 390 1347 390 476 389 477 389 476 389 476 389 476 389 476 389 1347 390 476 389 476 389 477 389 503 362 476 389 476 389 477 389 475 390 476 389 476 389 477 389 476 389 476 389 476 389 477 389 479 389 1347 390 479 390 1347 390 1348 389 476 389 476 389 477 389 477 390
|
||||
#
|
||||
name: Off
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3489 1725 493 375 493 1167 569 375 491 373 492 372 493 374 492 373 493 372 493 373 442 423 492 375 493 372 492 378 490 1245 443 423 493 374 491 375 490 374 442 424 492 374 491 379 440 1293 492 1245 443 1294 442 423 491 379 441 1296 491 375 441 423 442 423 442 425 441 423 442 425 440 424 441 425 441 424 441 421 444 424 441 425 441 423 442 423 442 423 442 453 413 424 442 451 414 424 441 426 440 424 441 424 441 424 441 425 441 424 441 424 441 424 441 426 440 425 440 427 442 1322 413 1296 442 424 441 423 442 424 441 424 442 427 441 9994 3463 1755 440 428 441 1296 441 426 440 425 440 426 439 425 440 426 440 423 442 425 440 425 440 372 494 425 440 428 440 1297 440 426 440 425 440 426 439 426 439 427 439 425 440 429 439 1297 439 1297 439 1297 440 426 439 429 440 1299 439 426 439 426 439 428 437 427 439 426 439 426 439 427 438 427 439 427 438 427 438 427 438 429 437 427 414 451 414 451 414 418 447 1323 414 452 413 455 414 1325 413 452 413 452 413 452 413 453 413 452 413 456 413 1324 413 453 413 452 413 453 412 452 413 454 412 453 412 453 412 453 412 452 413 1324 412 1323 412 1324 412 1324 412 1325 412 456 413 1324 412 404 461 1325 412 453 412 453 412 454 412 453 412 453 412 454 411 455 411 453 412 453 412 453 412 454 412 453 412 453 412 453 412 454 413 453 412 457 412 1323 413 1324 413 1324 412 453 412 453 412 454 413 453 412 453 412 453 412 454 412 452 413 456 412 1323 413 1324 413 1323 414 453 412 452 413 453 413 452 413 452 413 452 413 453 413 450 415 452 413 452 413 453 413 452 413 451 439 427 438 428 439 430 439 1298 439 426 439 428 438 426 439 428 437 426 439 427 438 1298 439 427 438 426 439 427 439 426 439 426 439 425 440 427 440 426 439 426 439 426 439 425 441 426 439 425 440 425 440 427 439 426 439 425 440 429 439 1297 440 1297 440 425 440 425 440 426 441 427 440
|
||||
#
|
||||
# Model: Maytag M6X06F2A
|
||||
#
|
||||
name: Off
|
||||
type: parsed
|
||||
protocol: NEC
|
||||
address: 20 00 00 00
|
||||
command: 02 00 00 00
|
||||
|
|
|
@ -4172,37 +4172,37 @@ type: raw
|
|||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4637 4376 612 419 584 420 584 420 583 421 582 1427 531 1477 531 472 532 472 557 1452 556 1451 557 1451 557 1452 556 447 557 448 556 449 555 449 555 4453 554 450 554 450 554 451 553 450 554 451 553 451 553 451 553 450 554 1455 553 1454 554 1454 554 451 553 1454 554 1454 554 1455 553 1454 554 451 553 450 554 450 554 1455 553 55439 4554 4458 555 449 555 449 555 450 554 450 554 1455 553 1454 554 451 553 450 554 1454 554 1454 554 1454 554 1455 553 450 554 451 553 451 553 451 553 4453 554 451 553 451 552 451 553 451 553 451 553 451 553 451 553 451 553 1455 553 1455 553 1455 553 451 553 1455 553 1455 553 1455 553 1455 553 451 553 451 552 451 553 1455 553
|
||||
#
|
||||
#
|
||||
name: Play
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4636 4380 612 392 612 394 610 394 610 419 583 1399 557 1452 556 473 556 448 556 1428 581 1453 555 1453 555 1453 555 449 555 450 554 451 553 452 552 4457 551 452 552 452 552 452 552 452 552 452 552 1457 551 452 552 1457 551 452 552 452 552 453 551 1457 552 1457 551 452 552 1457 551 452 552 1457 551 1457 551 1457 552 452 552 55450 4551 4461 553 451 553 452 552 452 552 452 552 1456 552 1456 552 452 552 452 552 1456 552 1456 552 1456 552 1456 552 452 552 452 552 453 551 453 551 4456 551 453 551 453 551 453 551 453 551 453 551 1457 551 453 551 1457 552 453 551 454 550 454 550 1457 552 1457 551 454 550 1457 551 454 550 1458 551 1457 551 1458 550 454 550
|
||||
#
|
||||
#
|
||||
name: Vol_up
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4640 4405 583 420 583 421 582 421 583 422 581 1427 531 1478 530 473 531 472 557 1452 557 1452 556 1452 556 1452 556 448 556 448 556 449 555 450 554 4454 554 451 553 451 553 451 553 451 553 1455 554 1455 553 1455 553 451 553 1455 553 1456 553 1456 553 451 553 451 553 451 553 451 554 1455 554 451 553 452 553 451 553 1456 553 55447 4556 4458 555 449 555 450 554 450 554 450 554 1455 553 1455 553 451 553 451 553 1455 553 1455 553 1455 553 1455 553 451 553 451 553 451 553 451 553 4454 553 451 553 450 554 451 553 450 554 1455 553 1455 553 1455 553 451 553 1455 553 1455 553 1455 553 451 553 451 553 451 553 450 554 1455 553 451 553 451 553 451 553 1455 553
|
||||
#
|
||||
#
|
||||
name: Vol_dn
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4636 4378 613 393 611 392 612 393 611 393 557 1451 558 1450 610 420 583 421 557 1427 581 1452 556 1452 556 1452 556 448 555 449 555 450 554 450 554 4455 553 451 553 451 553 451 553 451 553 451 553 451 553 452 552 1456 553 1456 552 1456 553 1456 552 451 553 1456 553 1456 552 1456 553 451 553 451 553 452 552 451 553 1456 552 55452 4553 4461 553 450 554 451 553 451 553 451 553 1456 553 1456 552 451 553 451 553 1456 552 1455 553 1455 553 1455 553 451 553 451 553 451 553 451 553 4456 552 451 553 451 553 451 553 451 553 451 553 451 553 451 553 1456 552 1455 553 1455 553 1455 553 451 553 1455 553 1456 552 1456 552 451 553 451 553 451 553 451 553 1456 552
|
||||
#
|
||||
#
|
||||
name: Prev
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 255 113623 4638 4378 613 391 612 392 559 446 558 446 558 1477 531 1477 532 472 532 472 532 1476 532 1476 532 1476 532 1477 531 473 555 449 555 449 555 450 554 4455 554 450 554 450 554 450 554 450 554 1455 554 1455 554 450 554 1455 554 450 555 450 554 450 554 1455 554 451 553 451 553 1455 554 450 554 1455 554 1456 553 1455 554 450 554
|
||||
#
|
||||
#
|
||||
name: Next
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 4557 4430 611 392 610 394 559 445 559 446 558 1451 558 1477 531 448 556 472 532 1476 532 1477 532 1477 531 1477 531 473 556 449 555 449 555 450 554 4454 554 450 554 450 554 450 554 450 555 450 554 450 554 1455 554 1455 554 450 554 450 554 450 554 1455 554 1455 554 1455 553 451 553 450 554 1455 554 1455 554 1455 554 450 554 55458 4555 4459 554 450 554 450 554 450 554 450 554 1455 553 1455 553 450 554 450 554 1455 553 1455 553 1455 553 1455 553 450 554 450 554 450 554 450 554 4454 554 450 554 450 554 450 554 451 553 450 554 450 554 1455 553 1455 553 451 553 450 554 450 554 1455 553 1455 553 1455 553 450 554 451 553 1455 554 1455 553 1455 553 450 554
|
||||
#
|
||||
#
|
||||
name: Mute
|
||||
type: raw
|
||||
frequency: 38000
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "thread.h"
|
||||
#include "thread_list.h"
|
||||
#include "thread_list_i.h"
|
||||
#include "kernel.h"
|
||||
#include "memmgr.h"
|
||||
#include "memmgr_heap.h"
|
||||
|
@ -65,6 +65,9 @@ struct FuriThread {
|
|||
// IMPORTANT: container MUST be the FIRST struct member
|
||||
static_assert(offsetof(FuriThread, container) == 0);
|
||||
|
||||
// Our idle priority should be equal to the one from FreeRTOS
|
||||
static_assert(FuriThreadPriorityIdle == tskIDLE_PRIORITY);
|
||||
|
||||
static size_t __furi_thread_stdout_write(FuriThread* thread, const char* data, size_t size);
|
||||
static int32_t __furi_thread_stdout_flush(FuriThread* thread);
|
||||
|
||||
|
@ -145,6 +148,8 @@ static void furi_thread_init_common(FuriThread* thread) {
|
|||
furi_thread_set_appid(thread, "driver");
|
||||
}
|
||||
|
||||
thread->priority = FuriThreadPriorityNormal;
|
||||
|
||||
FuriHalRtcHeapTrackMode mode = furi_hal_rtc_get_heap_track_mode();
|
||||
if(mode == FuriHalRtcHeapTrackModeAll) {
|
||||
thread->heap_trace_enabled = true;
|
||||
|
@ -269,7 +274,7 @@ void furi_thread_set_context(FuriThread* thread, void* context) {
|
|||
void furi_thread_set_priority(FuriThread* thread, FuriThreadPriority priority) {
|
||||
furi_check(thread);
|
||||
furi_check(thread->state == FuriThreadStateStopped);
|
||||
furi_check(priority >= FuriThreadPriorityIdle && priority <= FuriThreadPriorityIsr);
|
||||
furi_check(priority <= FuriThreadPriorityIsr);
|
||||
thread->priority = priority;
|
||||
}
|
||||
|
||||
|
@ -281,9 +286,7 @@ FuriThreadPriority furi_thread_get_priority(FuriThread* thread) {
|
|||
|
||||
void furi_thread_set_current_priority(FuriThreadPriority priority) {
|
||||
furi_check(priority <= FuriThreadPriorityIsr);
|
||||
|
||||
UBaseType_t new_priority = priority ? priority : FuriThreadPriorityNormal;
|
||||
vTaskPrioritySet(NULL, new_priority);
|
||||
vTaskPrioritySet(NULL, priority);
|
||||
}
|
||||
|
||||
FuriThreadPriority furi_thread_get_current_priority(void) {
|
||||
|
@ -345,7 +348,6 @@ void furi_thread_start(FuriThread* thread) {
|
|||
furi_thread_set_state(thread, FuriThreadStateStarting);
|
||||
|
||||
uint32_t stack_depth = thread->stack_size / sizeof(StackType_t);
|
||||
UBaseType_t priority = thread->priority ? thread->priority : FuriThreadPriorityNormal;
|
||||
|
||||
thread->is_active = true;
|
||||
|
||||
|
@ -355,7 +357,7 @@ void furi_thread_start(FuriThread* thread) {
|
|||
thread->name,
|
||||
stack_depth,
|
||||
thread,
|
||||
priority,
|
||||
thread->priority,
|
||||
thread->stack_buffer,
|
||||
&thread->container) == (TaskHandle_t)thread);
|
||||
}
|
||||
|
|
|
@ -30,11 +30,10 @@ typedef enum {
|
|||
* @brief Enumeration of possible FuriThread priorities.
|
||||
*/
|
||||
typedef enum {
|
||||
FuriThreadPriorityNone = 0, /**< Uninitialized, choose system default */
|
||||
FuriThreadPriorityIdle = 1, /**< Idle priority */
|
||||
FuriThreadPriorityIdle = 0, /**< Idle priority */
|
||||
FuriThreadPriorityLowest = 14, /**< Lowest */
|
||||
FuriThreadPriorityLow = 15, /**< Low */
|
||||
FuriThreadPriorityNormal = 16, /**< Normal */
|
||||
FuriThreadPriorityNormal = 16, /**< Normal, system default */
|
||||
FuriThreadPriorityHigh = 17, /**< High */
|
||||
FuriThreadPriorityHighest = 18, /**< Highest */
|
||||
FuriThreadPriorityIsr =
|
||||
|
|
|
@ -84,7 +84,7 @@ FuriThreadListItem* furi_thread_list_get_or_insert(FuriThreadList* instance, Fur
|
|||
}
|
||||
|
||||
void furi_thread_list_process(FuriThreadList* instance, uint32_t runtime, uint32_t tick) {
|
||||
furi_check(instance);
|
||||
furi_assert(instance);
|
||||
|
||||
instance->runtime_previous = instance->runtime_current;
|
||||
instance->runtime_current = runtime;
|
||||
|
|
|
@ -68,14 +68,6 @@ FuriThreadListItem* furi_thread_list_get_at(FuriThreadList* instance, size_t pos
|
|||
*/
|
||||
FuriThreadListItem* furi_thread_list_get_or_insert(FuriThreadList* instance, FuriThread* thread);
|
||||
|
||||
/** Process items in the FuriThreadList instance
|
||||
*
|
||||
* @param instance The instance
|
||||
* @param[in] runtime The runtime of the system since start
|
||||
* @param[in] tick The tick when processing happened
|
||||
*/
|
||||
void furi_thread_list_process(FuriThreadList* instance, uint32_t runtime, uint32_t tick);
|
||||
|
||||
/** Get percent of time spent in ISR
|
||||
*
|
||||
* @param instance The instance
|
||||
|
|
19
furi/core/thread_list_i.h
Normal file
19
furi/core/thread_list_i.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include "thread_list.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Process items in the FuriThreadList instance
|
||||
*
|
||||
* @param instance The instance
|
||||
* @param[in] runtime The runtime of the system since start
|
||||
* @param[in] tick The tick when processing happened
|
||||
*/
|
||||
void furi_thread_list_process(FuriThreadList* instance, uint32_t runtime, uint32_t tick);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,3 +1,9 @@
|
|||
/** Bit Buffer
|
||||
*
|
||||
* Various bits and bytes manipulation tools.
|
||||
*
|
||||
* @file bit_buffer.h
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -10,118 +16,128 @@ extern "C" {
|
|||
|
||||
typedef struct BitBuffer BitBuffer;
|
||||
|
||||
// Construction, deletion, reset
|
||||
|
||||
/**
|
||||
* Allocate a BitBuffer instance.
|
||||
/** Allocate a BitBuffer instance.
|
||||
*
|
||||
* @param [in] capacity_bytes maximum buffer capacity, in bytes
|
||||
* @return pointer to the allocated BitBuffer instance
|
||||
* @param[in] capacity_bytes maximum buffer capacity, in bytes
|
||||
*
|
||||
* @return pointer to the allocated BitBuffer instance
|
||||
*/
|
||||
BitBuffer* bit_buffer_alloc(size_t capacity_bytes);
|
||||
|
||||
/**
|
||||
* Delete a BitBuffer instance.
|
||||
/** Delete a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance
|
||||
* @param[in,out] buf pointer to a BitBuffer instance
|
||||
*/
|
||||
void bit_buffer_free(BitBuffer* buf);
|
||||
|
||||
/**
|
||||
* Clear all data from a BitBuffer instance.
|
||||
/** Clear all data from a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance
|
||||
* @param[in,out] buf pointer to a BitBuffer instance
|
||||
*/
|
||||
void bit_buffer_reset(BitBuffer* buf);
|
||||
|
||||
// Copy and write
|
||||
|
||||
/**
|
||||
* Copy another BitBuffer instance's contents to this one, replacing
|
||||
* all of the original data.
|
||||
* The destination capacity must be no less than the source data size.
|
||||
/** Copy another BitBuffer instance's contents to this one, replacing all of the
|
||||
* original data.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param [in] other pointer to a BitBuffer instance to copy from
|
||||
* @note
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param[in] other pointer to a BitBuffer instance to copy from
|
||||
*/
|
||||
void bit_buffer_copy(BitBuffer* buf, const BitBuffer* other);
|
||||
|
||||
/**
|
||||
* Copy all BitBuffer instance's contents to this one, starting from start_index,
|
||||
* replacing all of the original data.
|
||||
* The destination capacity must be no less than the source data size
|
||||
* counting from start_index.
|
||||
/** Copy all BitBuffer instance's contents to this one, starting from
|
||||
* start_index, replacing all of the original data.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param [in] other pointer to a BitBuffer instance to copy from
|
||||
* @param [in] start_index index to begin copying source data from
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size counting from start_index.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param[in] other pointer to a BitBuffer instance to copy from
|
||||
* @param[in] start_index index to begin copying source data from
|
||||
*/
|
||||
void bit_buffer_copy_right(BitBuffer* buf, const BitBuffer* other, size_t start_index);
|
||||
|
||||
/**
|
||||
* Copy all BitBuffer instance's contents to this one, ending with end_index,
|
||||
/** Copy all BitBuffer instance's contents to this one, ending with end_index,
|
||||
* replacing all of the original data.
|
||||
* The destination capacity must be no less than the source data size
|
||||
* counting to end_index.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param [in] other pointer to a BitBuffer instance to copy from
|
||||
* @param [in] end_index index to end copying source data at
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size counting to end_index.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param[in] other pointer to a BitBuffer instance to copy from
|
||||
* @param[in] end_index index to end copying source data at
|
||||
*/
|
||||
void bit_buffer_copy_left(BitBuffer* buf, const BitBuffer* other, size_t end_index);
|
||||
|
||||
/**
|
||||
* Copy a byte array to a BitBuffer instance, replacing all of the original data.
|
||||
* The destination capacity must be no less than the source data size.
|
||||
/** Copy a byte array to a BitBuffer instance, replacing all of the original
|
||||
* data.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param [in] data pointer to the byte array to be copied
|
||||
* @param [in] size_bytes size of the data to be copied, in bytes
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param[in] data pointer to the byte array to be copied
|
||||
* @param[in] size_bytes size of the data to be copied, in bytes
|
||||
*/
|
||||
void bit_buffer_copy_bytes(BitBuffer* buf, const uint8_t* data, size_t size_bytes);
|
||||
|
||||
/**
|
||||
* Copy a byte array to a BitBuffer instance, replacing all of the original data.
|
||||
* The destination capacity must be no less than the source data size.
|
||||
/** Copy a byte array to a BitBuffer instance, replacing all of the original
|
||||
* data.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param [in] data pointer to the byte array to be copied
|
||||
* @param [in] size_bits size of the data to be copied, in bits
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param[in] data pointer to the byte array to be copied
|
||||
* @param[in] size_bits size of the data to be copied, in bits
|
||||
*/
|
||||
void bit_buffer_copy_bits(BitBuffer* buf, const uint8_t* data, size_t size_bits);
|
||||
|
||||
/**
|
||||
* Copy a byte with parity array to a BitBuffer instance, replacing all of the original data.
|
||||
* The destination capacity must be no less than the source data size.
|
||||
/** Copy a byte with parity array to a BitBuffer instance, replacing all of the
|
||||
* original data.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param [in] data pointer to the byte array to be copied
|
||||
* @param [in] size_bitss size of the data to be copied, in bits
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to copy into
|
||||
* @param[in] data pointer to the byte array to be copied
|
||||
* @param[in] size_bits size of the data to be copied, in bits
|
||||
* @note Parity bits are placed starting with the most significant bit
|
||||
* of each byte and moving up.
|
||||
* @note Example: DDDDDDDD PDDDDDDD DPDDDDDD DDP...
|
||||
*/
|
||||
void bit_buffer_copy_bytes_with_parity(BitBuffer* buf, const uint8_t* data, size_t size_bits);
|
||||
|
||||
/**
|
||||
* Write a BitBuffer instance's entire contents to an arbitrary memory location.
|
||||
* The destination memory must be allocated. Additionally, the destination
|
||||
* capacity must be no less than the source data size.
|
||||
/** Write a BitBuffer instance's entire contents to an arbitrary memory location.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to write from
|
||||
* @param [out] dest pointer to the destination memory location
|
||||
* @param [in] size_bytes maximum destination data size, in bytes
|
||||
* @warning The destination memory must be allocated. Additionally, the
|
||||
* destination capacity must be no less than the source data size.
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to write from
|
||||
* @param[out] dest pointer to the destination memory location
|
||||
* @param[in] size_bytes maximum destination data size, in bytes
|
||||
*/
|
||||
void bit_buffer_write_bytes(const BitBuffer* buf, void* dest, size_t size_bytes);
|
||||
|
||||
/**
|
||||
* Write a BitBuffer instance's entire contents to an arbitrary memory location.
|
||||
* Additionally, place a parity bit after each byte.
|
||||
* The destination memory must be allocated. Additionally, the destination
|
||||
* capacity must be no less than the source data size plus parity.
|
||||
/** Write a BitBuffer instance's entire contents to an arbitrary memory location.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to write from
|
||||
* @param [out] dest pointer to the destination memory location
|
||||
* @param [in] size_bytes maximum destination data size, in bytes
|
||||
* @param [out] bits_written actual number of bits writen, in bits
|
||||
* Additionally, place a parity bit after each byte.
|
||||
*
|
||||
* @warning The destination memory must be allocated. Additionally, the
|
||||
* destination capacity must be no less than the source data size
|
||||
* plus parity.
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to write from
|
||||
* @param[out] dest pointer to the destination memory location
|
||||
* @param[in] size_bytes maximum destination data size, in bytes
|
||||
* @param[out] bits_written actual number of bits written, in bits
|
||||
* @note Parity bits are placed starting with the most significant bit of
|
||||
* each byte and moving up.
|
||||
* @note Example: DDDDDDDD PDDDDDDD DPDDDDDD DDP...
|
||||
*/
|
||||
void bit_buffer_write_bytes_with_parity(
|
||||
const BitBuffer* buf,
|
||||
|
@ -129,15 +145,17 @@ void bit_buffer_write_bytes_with_parity(
|
|||
size_t size_bytes,
|
||||
size_t* bits_written);
|
||||
|
||||
/**
|
||||
* Write a slice of BitBuffer instance's contents to an arbitrary memory location.
|
||||
* The destination memory must be allocated. Additionally, the destination
|
||||
* capacity must be no less than the requested slice size.
|
||||
/** Write a slice of BitBuffer instance's contents to an arbitrary memory
|
||||
* location.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to write from
|
||||
* @param [out] dest pointer to the destination memory location
|
||||
* @param [in] start_index index to begin copying source data from
|
||||
* @param [in] size_bytes data slice size, in bytes
|
||||
* @warning The destination memory must be allocated. Additionally, the
|
||||
* destination capacity must be no less than the requested slice
|
||||
* size.
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to write from
|
||||
* @param[out] dest pointer to the destination memory location
|
||||
* @param[in] start_index index to begin copying source data from
|
||||
* @param[in] size_bytes data slice size, in bytes
|
||||
*/
|
||||
void bit_buffer_write_bytes_mid(
|
||||
const BitBuffer* buf,
|
||||
|
@ -147,176 +165,196 @@ void bit_buffer_write_bytes_mid(
|
|||
|
||||
// Checks
|
||||
|
||||
/**
|
||||
* Check whether a BitBuffer instance contains a partial byte (i.e. the bit count
|
||||
* is not divisible by 8).
|
||||
/** Check whether a BitBuffer instance contains a partial byte (i.e.\ the bit
|
||||
* count is not divisible by 8).
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be checked
|
||||
* @return true if the instance contains a partial byte, false otherwise
|
||||
* @param[in] buf pointer to a BitBuffer instance to be checked
|
||||
*
|
||||
* @return true if the instance contains a partial byte, false otherwise
|
||||
*/
|
||||
bool bit_buffer_has_partial_byte(const BitBuffer* buf);
|
||||
|
||||
/**
|
||||
* Check whether a BitBuffer instance's contents start with the designated byte.
|
||||
/** Check whether a BitBuffer instance's contents start with the designated byte.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be checked
|
||||
* @param [in] byte byte value to be checked against
|
||||
* @return true if data starts with designated byte, false otherwise
|
||||
* @param[in] buf pointer to a BitBuffer instance to be checked
|
||||
* @param[in] byte byte value to be checked against
|
||||
*
|
||||
* @return true if data starts with designated byte, false otherwise
|
||||
*/
|
||||
bool bit_buffer_starts_with_byte(const BitBuffer* buf, uint8_t byte);
|
||||
|
||||
// Getters
|
||||
|
||||
/**
|
||||
* Get a BitBuffer instance's capacity (i.e. the maximum possible amount of data), in bytes.
|
||||
/** Get a BitBuffer instance's capacity (i.e.\ the maximum possible amount of
|
||||
* data), in bytes.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @return capacity, in bytes
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
*
|
||||
* @return capacity, in bytes
|
||||
*/
|
||||
size_t bit_buffer_get_capacity_bytes(const BitBuffer* buf);
|
||||
|
||||
/**
|
||||
* Get a BitBuffer instance's data size (i.e. the amount of stored data), in bits.
|
||||
* Might be not divisible by 8 (see bit_buffer_is_partial_byte).
|
||||
/** Get a BitBuffer instance's data size (i.e.\ the amount of stored data), in
|
||||
* bits.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @return data size, in bits.
|
||||
* @warning Might be not divisible by 8 (see bit_buffer_is_partial_byte).
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
*
|
||||
* @return data size, in bits.
|
||||
*/
|
||||
size_t bit_buffer_get_size(const BitBuffer* buf);
|
||||
|
||||
/**
|
||||
* Get a BitBuffer instance's data size (i.e. the amount of stored data), in bytes.
|
||||
* If a partial byte is present, it is also counted.
|
||||
* Get a BitBuffer instance's data size (i.e.\ the amount of stored data), in
|
||||
* bytes.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @return data size, in bytes.
|
||||
* @warning If a partial byte is present, it is also counted.
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
*
|
||||
* @return data size, in bytes.
|
||||
*/
|
||||
size_t bit_buffer_get_size_bytes(const BitBuffer* buf);
|
||||
|
||||
/**
|
||||
* Get a byte value at a specified index in a BitBuffer instance.
|
||||
* The index must be valid (i.e. less than the instance's data size in bytes).
|
||||
/** Get a byte value at a specified index in a BitBuffer instance.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @param [in] index index of the byte in question
|
||||
* @warning The index must be valid (i.e.\ less than the instance's data size
|
||||
* in bytes).
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
* @param[in] index index of the byte in question
|
||||
*
|
||||
* @return byte value
|
||||
*/
|
||||
uint8_t bit_buffer_get_byte(const BitBuffer* buf, size_t index);
|
||||
|
||||
/**
|
||||
* Get a byte value starting from the specified bit index in a BitBuffer instance.
|
||||
* The resulting byte might correspond to a single byte (if the index is a multiple
|
||||
* of 8), or two overlapping bytes combined.
|
||||
* The index must be valid (i.e. less than the instance's data size in bits).
|
||||
/** Get a byte value starting from the specified bit index in a BitBuffer
|
||||
* instance.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @param [in] index bit index of the byte in question
|
||||
* @warning The resulting byte might correspond to a single byte (if the
|
||||
* index is a multiple of 8), or two overlapping bytes combined. The
|
||||
* index must be valid (i.e.\ less than the instance's data size in
|
||||
* bits).
|
||||
*
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
* @param[in] index_bits bit index of the byte in question
|
||||
*
|
||||
* @return byte value
|
||||
*/
|
||||
uint8_t bit_buffer_get_byte_from_bit(const BitBuffer* buf, size_t index_bits);
|
||||
|
||||
/**
|
||||
* Get the pointer to a BitBuffer instance's underlying data.
|
||||
/** Get the pointer to a BitBuffer instance's underlying data.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @return pointer to the underlying data
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
*
|
||||
* @return pointer to the underlying data
|
||||
*/
|
||||
const uint8_t* bit_buffer_get_data(const BitBuffer* buf);
|
||||
|
||||
/**
|
||||
* Get the pointer to a BitBuffer instance's underlying data.
|
||||
/** Get the pointer to the parity data of a BitBuffer instance.
|
||||
*
|
||||
* @param [in] buf pointer to a BitBuffer instance to be queried
|
||||
* @return pointer to the underlying data
|
||||
* @param[in] buf pointer to a BitBuffer instance to be queried
|
||||
*
|
||||
* @return pointer to the parity data
|
||||
*/
|
||||
const uint8_t* bit_buffer_get_parity(const BitBuffer* buf);
|
||||
|
||||
// Setters
|
||||
|
||||
/**
|
||||
* Set byte value at a specified index in a BitBuffer instance.
|
||||
* The index must be valid (i.e. less than the instance's data size in bytes).
|
||||
/** Set byte value at a specified index in a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be modified
|
||||
* @param [in] index index of the byte in question
|
||||
* @param [in] byte byte value to be set at index
|
||||
* @warning The index must be valid (i.e.\ less than the instance's data
|
||||
* size in bytes).
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be modified
|
||||
* @param[in] index index of the byte in question
|
||||
* @param[in] byte byte value to be set at index
|
||||
*/
|
||||
void bit_buffer_set_byte(BitBuffer* buf, size_t index, uint8_t byte);
|
||||
|
||||
/**
|
||||
* Set byte and parity bit value at a specified index in a BitBuffer instance.
|
||||
* The index must be valid (i.e. less than the instance's data size in bytes).
|
||||
/** Set byte and parity bit value at a specified index in a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be modified
|
||||
* @param [in] index index of the byte in question
|
||||
* @param [in] byte byte value to be set at index
|
||||
* @param [in] parity parity bit value to be set at index
|
||||
* @warning The index must be valid (i.e.\ less than the instance's data
|
||||
* size in bytes).
|
||||
*
|
||||
* @param[in,out] buff pointer to a BitBuffer instance to be modified
|
||||
* @param[in] index index of the byte in question
|
||||
* @param[in] byte byte value to be set at index
|
||||
* @param[in] parity parity bit value to be set at index
|
||||
*/
|
||||
void bit_buffer_set_byte_with_parity(BitBuffer* buff, size_t index, uint8_t byte, bool parity);
|
||||
|
||||
/**
|
||||
* Resize a BitBuffer instance to a new size, in bits.
|
||||
* @warning May cause bugs. Use only if absolutely necessary.
|
||||
/** Resize a BitBuffer instance to a new size, in bits.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be resized
|
||||
* @param [in] new_size the new size of the buffer, in bits
|
||||
* @warning May cause bugs. Use only if absolutely necessary.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be resized
|
||||
* @param[in] new_size the new size of the buffer, in bits
|
||||
*/
|
||||
void bit_buffer_set_size(BitBuffer* buf, size_t new_size);
|
||||
|
||||
/**
|
||||
* Resize a BitBuffer instance to a new size, in bytes.
|
||||
* @warning May cause bugs. Use only if absolutely necessary.
|
||||
/** Resize a BitBuffer instance to a new size, in bytes.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be resized
|
||||
* @param [in] new_size_bytes the new size of the buffer, in bytes
|
||||
* @warning May cause bugs. Use only if absolutely necessary.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be resized
|
||||
* @param[in] new_size_bytes the new size of the buffer, in bytes
|
||||
*/
|
||||
void bit_buffer_set_size_bytes(BitBuffer* buf, size_t new_size_bytes);
|
||||
|
||||
// Modification
|
||||
|
||||
/**
|
||||
* Append all BitBuffer's instance contents to this one. The destination capacity
|
||||
* must be no less than its original data size plus source data size.
|
||||
/** Append all BitBuffer's instance contents to this one.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param [in] other pointer to a BitBuffer instance to be appended
|
||||
* @warning The destination capacity must be no less than its original
|
||||
* data size plus source data size.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param[in] other pointer to a BitBuffer instance to be appended
|
||||
*/
|
||||
void bit_buffer_append(BitBuffer* buf, const BitBuffer* other);
|
||||
|
||||
/**
|
||||
* Append a BitBuffer's instance contents to this one, starting from start_index.
|
||||
* The destination capacity must be no less than the source data size
|
||||
* counting from start_index.
|
||||
/** Append a BitBuffer's instance contents to this one, starting from
|
||||
* start_index.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param [in] other pointer to a BitBuffer instance to be appended
|
||||
* @param [in] start_index index to begin copying source data from
|
||||
* @warning The destination capacity must be no less than the source data
|
||||
* size counting from start_index.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param[in] other pointer to a BitBuffer instance to be appended
|
||||
* @param[in] start_index index to begin copying source data from
|
||||
*/
|
||||
void bit_buffer_append_right(BitBuffer* buf, const BitBuffer* other, size_t start_index);
|
||||
|
||||
/**
|
||||
* Append a byte to a BitBuffer instance.
|
||||
* The destination capacity must be no less its original data size plus one.
|
||||
/** Append a byte to a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param [in] byte byte value to be appended
|
||||
* @warning The destination capacity must be no less its original data
|
||||
* size plus one.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param[in] byte byte value to be appended
|
||||
*/
|
||||
void bit_buffer_append_byte(BitBuffer* buf, uint8_t byte);
|
||||
|
||||
/**
|
||||
* Append a byte array to a BitBuffer instance.
|
||||
* The destination capacity must be no less its original data size plus source data size.
|
||||
/** Append a byte array to a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param [in] data pointer to the byte array to be appended
|
||||
* @param [in] size_bytes size of the data to be appended, in bytes
|
||||
* @warning The destination capacity must be no less its original data
|
||||
* size plus source data size.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param[in] data pointer to the byte array to be appended
|
||||
* @param[in] size_bytes size of the data to be appended, in bytes
|
||||
*/
|
||||
void bit_buffer_append_bytes(BitBuffer* buf, const uint8_t* data, size_t size_bytes);
|
||||
|
||||
/**
|
||||
* Append a bit to a BitBuffer instance.
|
||||
* The destination capacity must be sufficient to accomodate the additional bit.
|
||||
/** Append a bit to a BitBuffer instance.
|
||||
*
|
||||
* @param [in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param [in] bit bit value to be appended
|
||||
* @warning The destination capacity must be sufficient to accommodate the
|
||||
* additional bit.
|
||||
*
|
||||
* @param[in,out] buf pointer to a BitBuffer instance to be appended to
|
||||
* @param[in] bit bit value to be appended
|
||||
*/
|
||||
void bit_buffer_append_bit(BitBuffer* buf, bool bit);
|
||||
|
||||
|
|
|
@ -32,6 +32,16 @@ class FlipperFormatFile:
|
|||
raise Exception("Unexpected line: not `key:value`")
|
||||
return data[0].strip(), data[1].strip()
|
||||
|
||||
def readComment(self):
|
||||
if self.cursor == len(self.lines):
|
||||
raise EOFError()
|
||||
line = self.lines[self.cursor].strip()
|
||||
if line.startswith("#"):
|
||||
self.cursor += 1
|
||||
return line[1:].strip()
|
||||
else:
|
||||
return None
|
||||
|
||||
def readKey(self, key: str):
|
||||
k, v = self.readKeyValue()
|
||||
if k != key:
|
||||
|
@ -67,7 +77,7 @@ class FlipperFormatFile:
|
|||
self.writeLine("")
|
||||
|
||||
def writeComment(self, text: str):
|
||||
if text:
|
||||
if text and len(text):
|
||||
self.writeLine(f"# {text}")
|
||||
else:
|
||||
self.writeLine("#")
|
||||
|
@ -104,3 +114,4 @@ class FlipperFormatFile:
|
|||
def save(self, filename: str):
|
||||
with open(filename, "w", newline="\n") as file:
|
||||
file.write("\n".join(self.lines))
|
||||
file.write("\n")
|
||||
|
|
|
@ -27,37 +27,51 @@ class Main(App):
|
|||
return 1
|
||||
|
||||
data = []
|
||||
unique = {}
|
||||
unique_combo = {}
|
||||
unique_payload = {}
|
||||
while True:
|
||||
try:
|
||||
d = {}
|
||||
d["comments"] = []
|
||||
while (comment := f.readComment()) is not None:
|
||||
d["comments"].append(comment)
|
||||
d["name"] = f.readKey("name")
|
||||
d["type"] = f.readKey("type")
|
||||
key = None
|
||||
key_combo = f'{d["name"]}'
|
||||
key_payload = None
|
||||
if d["type"] == "parsed":
|
||||
d["protocol"] = f.readKey("protocol")
|
||||
d["address"] = f.readKey("address")
|
||||
d["command"] = f.readKey("command")
|
||||
key = f'{d["protocol"]}{d["address"]}{d["command"]}'
|
||||
key_payload = f'{d["protocol"]}{d["address"]}{d["command"]}'
|
||||
key_combo += key_payload
|
||||
elif d["type"] == "raw":
|
||||
d["frequency"] = f.readKey("frequency")
|
||||
d["duty_cycle"] = f.readKey("duty_cycle")
|
||||
d["data"] = f.readKey("data")
|
||||
key = f'{d["frequency"]}{d["duty_cycle"]}{d["data"]}'
|
||||
key_payload = f'{d["frequency"]}{d["duty_cycle"]}{d["data"]}'
|
||||
key_combo += key_payload
|
||||
else:
|
||||
raise Exception(f'Unknown type: {d["type"]}')
|
||||
if not key in unique:
|
||||
unique[key] = d
|
||||
|
||||
if not key_combo in unique_combo:
|
||||
unique_combo[key_combo] = d
|
||||
data.append(d)
|
||||
# Check payload only
|
||||
if not key_payload in unique_payload:
|
||||
unique_payload[key_payload] = d
|
||||
else:
|
||||
self.logger.warning(f"Duplicate payload, check manually: {d}")
|
||||
else:
|
||||
self.logger.warn(f"Duplicate key: {key}")
|
||||
self.logger.info(f"Duplicate data removed: {d}")
|
||||
except EOFError:
|
||||
break
|
||||
# Form new file
|
||||
f = FlipperFormatFile()
|
||||
f.setHeader(filetype, version)
|
||||
for i in data:
|
||||
f.writeComment(None)
|
||||
for comment in i["comments"]:
|
||||
f.writeComment(comment)
|
||||
f.writeKey("name", i["name"])
|
||||
f.writeKey("type", i["type"])
|
||||
if i["type"] == "parsed":
|
||||
|
|
|
@ -121,7 +121,7 @@ class Main(App):
|
|||
try:
|
||||
shutil.rmtree(self.output_dir_path)
|
||||
except Exception as ex:
|
||||
self.logger.warn(f"Failed to clean output directory: {ex}")
|
||||
self.logger.warning(f"Failed to clean output directory: {ex}")
|
||||
|
||||
if not exists(self.output_dir_path):
|
||||
self.logger.debug(f"Creating output directory {self.output_dir_path}")
|
||||
|
|
|
@ -152,7 +152,7 @@ class Main(App):
|
|||
return 3
|
||||
|
||||
if not self.layout_check(updater_stage_size, dfu_size, radio_addr):
|
||||
self.logger.warn("Memory layout looks suspicious")
|
||||
self.logger.warning("Memory layout looks suspicious")
|
||||
if self.args.disclaimer != "yes":
|
||||
self.show_disclaimer()
|
||||
return 2
|
||||
|
@ -205,7 +205,7 @@ class Main(App):
|
|||
|
||||
def layout_check(self, stage_size, fw_size, radio_addr):
|
||||
if stage_size > self.UPDATER_SIZE_THRESHOLD:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"Updater size {stage_size}b > {self.UPDATER_SIZE_THRESHOLD}b and is not loadable on older firmwares!"
|
||||
)
|
||||
|
||||
|
@ -217,13 +217,13 @@ class Main(App):
|
|||
self.logger.debug(f"Expected reserved space size: {fw2stack_gap}")
|
||||
fw2stack_gap_pages = fw2stack_gap / self.FLASH_PAGE_SIZE
|
||||
if fw2stack_gap_pages < 0:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"Firmware image overlaps C2 region and is not programmable!"
|
||||
)
|
||||
return False
|
||||
|
||||
elif fw2stack_gap_pages < self.MIN_GAP_PAGES:
|
||||
self.logger.warn(
|
||||
self.logger.warning(
|
||||
f"Expected reserved flash size is too small (~{int(fw2stack_gap_pages)} page(s), need >={self.MIN_GAP_PAGES} page(s))"
|
||||
)
|
||||
return False
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
entry,status,name,type,params
|
||||
Version,+,74.0,,
|
||||
Version,+,75.0,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
|
@ -1652,7 +1652,6 @@ Function,+,furi_thread_list_free,void,FuriThreadList*
|
|||
Function,+,furi_thread_list_get_at,FuriThreadListItem*,"FuriThreadList*, size_t"
|
||||
Function,+,furi_thread_list_get_isr_time,float,FuriThreadList*
|
||||
Function,+,furi_thread_list_get_or_insert,FuriThreadListItem*,"FuriThreadList*, FuriThread*"
|
||||
Function,+,furi_thread_list_process,void,"FuriThreadList*, uint32_t, uint32_t"
|
||||
Function,+,furi_thread_list_size,size_t,FuriThreadList*
|
||||
Function,+,furi_thread_resume,void,FuriThreadId
|
||||
Function,+,furi_thread_set_appid,void,"FuriThread*, const char*"
|
||||
|
|
|
|
@ -1,5 +1,5 @@
|
|||
entry,status,name,type,params
|
||||
Version,+,74.0,,
|
||||
Version,+,75.0,,
|
||||
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt_keys_storage.h,,
|
||||
|
@ -1908,7 +1908,6 @@ Function,+,furi_thread_list_free,void,FuriThreadList*
|
|||
Function,+,furi_thread_list_get_at,FuriThreadListItem*,"FuriThreadList*, size_t"
|
||||
Function,+,furi_thread_list_get_isr_time,float,FuriThreadList*
|
||||
Function,+,furi_thread_list_get_or_insert,FuriThreadListItem*,"FuriThreadList*, FuriThread*"
|
||||
Function,+,furi_thread_list_process,void,"FuriThreadList*, uint32_t, uint32_t"
|
||||
Function,+,furi_thread_list_size,size_t,FuriThreadList*
|
||||
Function,+,furi_thread_resume,void,FuriThreadId
|
||||
Function,+,furi_thread_set_appid,void,"FuriThread*, const char*"
|
||||
|
|
|
Loading…
Reference in a new issue