OSDN Git Service
(root)
/
openi2cradio
/
OpenI2CRadio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dacd7c
)
[Tuner] ADD trap of overflow on tuning.
author
K.Ohta
<whatisthis.sowhat@gmail.com>
Tue, 11 Jun 2013 02:56:04 +0000
(11:56 +0900)
committer
K.Ohta
<whatisthis.sowhat@gmail.com>
Tue, 11 Jun 2013 02:56:04 +0000
(11:56 +0900)
akc6955.c
patch
|
blob
|
history
diff --git
a/akc6955.c
b/akc6955.c
index
0a43c40
..
97c29eb
100644
(file)
--- a/
akc6955.c
+++ b/
akc6955.c
@@
-113,6
+113,8
@@
unsigned int akc6955_set_tune(unsigned char mode_3k, unsigned int ch)
// BAND=AM && MW2
i = (i / 3) * 3;
}
+ if(i < 0) i = 0;
+ if(i > 0x1fff) i = 0x1fff;
if(mode_3k == 0){
b = ((i >> 8) & 0x1f) | 0x40; // 32.768KHz clock
} else {