summaryrefslogtreecommitdiffstats
path: root/Support_Libs
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-11 16:13:58 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-11 16:13:58 (GMT)
commit27405f4f8c65baabb28ce427912851be10207781 (patch)
tree3a090403142563d916a8cbb5ef8a3c4113a5b6ae /Support_Libs
parent9877678730e53e9ee99241a8ab5babe35eacf28d (diff)
downloadTASS-27405f4f8c65baabb28ce427912851be10207781.zip
TASS-27405f4f8c65baabb28ce427912851be10207781.tar.gz
TASS-27405f4f8c65baabb28ce427912851be10207781.tar.bz2
Added fft files
fixed some issues, included equalizer.
Diffstat (limited to 'Support_Libs')
-rw-r--r--Support_Libs/debug/debug.hcc36
1 files changed, 24 insertions, 12 deletions
diff --git a/Support_Libs/debug/debug.hcc b/Support_Libs/debug/debug.hcc
index 618ca46..ac7c481 100644
--- a/Support_Libs/debug/debug.hcc
+++ b/Support_Libs/debug/debug.hcc
@@ -4,21 +4,33 @@
#include "debug.hch"
-void print_hex_value(unsigned 32 value)
-{
- unsigned 8 ch;
- unsigned 4 i;
+void print_hex_value(unsigned 32 value) {
+ unsigned char character;
+ unsigned 4 index;
- for(i = 0;i < 8;i++)
- {
- ch = 0 @ (value\\28);
+ /*
+ * We print 32 bits values max, so we only need 8 positions.
+ */
+ for(index = 0; index != 7; index++) {
+ /*
+ * The 4 MSB equals one hex digit so we ignore the rest.
+ */
+ character = 0 @ (value \\ 28);
+ /*
+ * To easly get our 4 MSB on the next run, we shift them here.
+ */
value <<= 4;
- ch += (ch > 9) ? 0x37 : 0x30;
- PalDataPortWrite(PalRS232PortCT(0), ch);
+ /*
+ * We now have a value between 0 and f stored in our variable.
+ * We simply add the appropiate value to our character because
+ * only ascii characters make sense to be printed.
+ */
+ character += (character > 9) ? 0x37 : 0x30;
+ PalDataPortWrite(PalRS232PortCT(0), character);
}
}
-void print_string(unsigned char *s) {
+void print_string(unsigned char *string) {
unsigned 10 index;
/*
@@ -27,8 +39,8 @@ void print_string(unsigned char *s) {
* with the '\0' character. Since Handel-C init's var's to 0 this
* normally will never go wrong.
*/
- for(index = 0; '\0' != s[index]; index++) {
- PalDataPortWrite(PalRS232PortCT(0), s[index]);
+ for(index = 0; '\0' != string[index]; index++) {
+ PalDataPortWrite(PalRS232PortCT(0), string[index]);
}
}