|
51 | 51 | #define MAGIC2 0x56788765
|
52 | 52 |
|
53 | 53 |
|
54 |
| -static int new_count = 0; |
55 |
| -static int delete_count = 0; |
| 54 | +volatile static int new_count = 0; |
| 55 | +volatile static int delete_count = 0; |
56 | 56 |
|
57 | 57 |
|
58 | 58 | /***********************************************************************************
|
@@ -425,6 +425,50 @@ alevel_t rrbb_get_audio_level (rrbb_t b)
|
425 | 425 |
|
426 | 426 |
|
427 | 427 |
|
| 428 | +/*********************************************************************************** |
| 429 | + * |
| 430 | + * Name: rrbb_set_speed_error |
| 431 | + * |
| 432 | + * Purpose: Set speed error of the received frame. |
| 433 | + * |
| 434 | + * Inputs: b Handle for bit array. |
| 435 | + * speed_error In percentage. |
| 436 | + * |
| 437 | + ***********************************************************************************/ |
| 438 | + |
| 439 | +void rrbb_set_speed_error (rrbb_t b, float speed_error) |
| 440 | +{ |
| 441 | + assert (b != NULL); |
| 442 | + assert (b->magic1 == MAGIC1); |
| 443 | + assert (b->magic2 == MAGIC2); |
| 444 | + |
| 445 | + b->speed_error = speed_error; |
| 446 | +} |
| 447 | + |
| 448 | + |
| 449 | +/*********************************************************************************** |
| 450 | + * |
| 451 | + * Name: rrbb_get_speed_error |
| 452 | + * |
| 453 | + * Purpose: Get speed error of the received frame. |
| 454 | + * |
| 455 | + * Inputs: b Handle for bit array. |
| 456 | + * |
| 457 | + * Returns: speed error in percentage. |
| 458 | + * |
| 459 | + ***********************************************************************************/ |
| 460 | + |
| 461 | +float rrbb_get_speed_error (rrbb_t b) |
| 462 | +{ |
| 463 | + assert (b != NULL); |
| 464 | + assert (b->magic1 == MAGIC1); |
| 465 | + assert (b->magic2 == MAGIC2); |
| 466 | + |
| 467 | + return (b->speed_error); |
| 468 | +} |
| 469 | + |
| 470 | + |
| 471 | + |
428 | 472 | /***********************************************************************************
|
429 | 473 | *
|
430 | 474 | * Name: rrbb_get_is_scrambled
|
@@ -488,6 +532,7 @@ int rrbb_get_prev_descram (rrbb_t b)
|
488 | 532 | }
|
489 | 533 |
|
490 | 534 |
|
| 535 | + |
491 | 536 | /* end rrbb.c */
|
492 | 537 |
|
493 | 538 |
|
0 commit comments