diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-12-29 14:55:49 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-12-29 14:55:49 +0000 |
commit | 2403f38c1fd8bc35d4d8e4b12047265366fbf1b7 (patch) | |
tree | da021fed131c9c05512ea7632b059b19ff37b0a7 /firmware/drivers/tuner | |
parent | ea55ad07b700307b6f66960e08b52d96828ce789 (diff) | |
download | rockbox-2403f38c1fd8bc35d4d8e4b12047265366fbf1b7.tar.gz rockbox-2403f38c1fd8bc35d4d8e4b12047265366fbf1b7.zip |
RDS: Use a define that doesn't imply any particular hardware dependency.
Theoretically, anything with the capability could implement the decoding
action in an ISR on any radio chip supporting RDS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31464 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/tuner')
-rw-r--r-- | firmware/drivers/tuner/si4700.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c index 0684d2042f..917f628490 100644 --- a/firmware/drivers/tuner/si4700.c +++ b/firmware/drivers/tuner/si4700.c | |||
@@ -21,9 +21,8 @@ | |||
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "config.h" | 23 | #include "config.h" |
24 | #include <stdbool.h> | 24 | #include "system.h" |
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include <stdlib.h> | ||
27 | #include "kernel.h" | 26 | #include "kernel.h" |
28 | #include "power.h" | 27 | #include "power.h" |
29 | #include "tuner.h" /* tuner abstraction interface */ | 28 | #include "tuner.h" /* tuner abstraction interface */ |
@@ -529,9 +528,17 @@ int si4700_get(int setting) | |||
529 | 528 | ||
530 | #ifdef HAVE_RDS_CAP | 529 | #ifdef HAVE_RDS_CAP |
531 | case RADIO_EVENT: | 530 | case RADIO_EVENT: |
531 | { | ||
532 | #ifdef RDS_ISR_PROCESSING | ||
533 | int oldlevel = disable_irq_save(); | ||
534 | #endif | ||
532 | val = rds_event; | 535 | val = rds_event; |
533 | rds_event = 0; | 536 | rds_event = 0; |
537 | #ifdef RDS_ISR_PROCESSING | ||
538 | restore_irq(oldlevel); | ||
539 | #endif | ||
534 | break; | 540 | break; |
541 | } | ||
535 | #endif | 542 | #endif |
536 | } | 543 | } |
537 | 544 | ||
@@ -557,8 +564,8 @@ void si4700_dbg_info(struct si4700_dbg_info *nfo) | |||
557 | 564 | ||
558 | #ifdef HAVE_RDS_CAP | 565 | #ifdef HAVE_RDS_CAP |
559 | 566 | ||
560 | #ifdef SI4700_RDS_ASYNC | 567 | #ifdef RDS_ISR_PROCESSING |
561 | /* Read raw RDS info for processing - asynchronously */ | 568 | /* Read raw RDS info for processing - in ISR */ |
562 | 569 | ||
563 | /* Assumes regbuf is 32 bytes */ | 570 | /* Assumes regbuf is 32 bytes */ |
564 | void si4700_rds_read_raw_async(void) | 571 | void si4700_rds_read_raw_async(void) |
@@ -583,7 +590,7 @@ void si4700_rds_set_event(void) | |||
583 | rds_event = 1; | 590 | rds_event = 1; |
584 | } | 591 | } |
585 | 592 | ||
586 | #else | 593 | #else /* ndef RDS_ISR_PROCESSING */ |
587 | /* Read raw RDS info for processing */ | 594 | /* Read raw RDS info for processing */ |
588 | bool si4700_rds_read_raw(uint16_t data[4]) | 595 | bool si4700_rds_read_raw(uint16_t data[4]) |
589 | { | 596 | { |
@@ -610,7 +617,7 @@ void si4700_rds_set_event(void) | |||
610 | rds_event = 1; | 617 | rds_event = 1; |
611 | mutex_unlock(&fmr_mutex); | 618 | mutex_unlock(&fmr_mutex); |
612 | } | 619 | } |
613 | #endif /* SI4700_RDS_ASYNC */ | 620 | #endif /* RDS_ISR_PROCESSING */ |
614 | 621 | ||
615 | char * si4700_get_rds_info(int setting) | 622 | char * si4700_get_rds_info(int setting) |
616 | { | 623 | { |