diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2004-10-21 09:38:26 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2004-10-21 09:38:26 (GMT) |
commit | 8dc8d2307a1ff34a75b678659434996af3a2e734 (patch) | |
tree | bb4304dd2fadaaad15d621c3163532c59c3f832b /Support_Libs/debug | |
parent | a651ae0a1d303f92043624dec87314e369bf2bca (diff) | |
download | TASS-8dc8d2307a1ff34a75b678659434996af3a2e734.zip TASS-8dc8d2307a1ff34a75b678659434996af3a2e734.tar.gz TASS-8dc8d2307a1ff34a75b678659434996af3a2e734.tar.bz2 |
Diffstat (limited to 'Support_Libs/debug')
-rw-r--r-- | Support_Libs/debug/debug.hcc | 21 | ||||
-rw-r--r-- | Support_Libs/debug/debug.hch | 18 |
2 files changed, 22 insertions, 17 deletions
diff --git a/Support_Libs/debug/debug.hcc b/Support_Libs/debug/debug.hcc index 2cc6bef..303adde 100644 --- a/Support_Libs/debug/debug.hcc +++ b/Support_Libs/debug/debug.hcc @@ -19,15 +19,20 @@ void print_hex_value(unsigned value) ch += (ch > 9) ? 0x37 : 0x30;
PalDataPortWrite(PalRS232PortCT(0), ch);
}
-
- PalDataPortWrite(PalRS232PortCT(0), 0x0A);
- PalDataPortWrite(PalRS232PortCT(0), 0x0D);
}
-void print_string(unsigned 8 s[16]) {
+void print_string(unsigned char *s) {
unsigned 4 i;
-
- for(i = 0;('\0' != s[i]) || (0 < i);i++) {
- PalDataPortWrite(PalRS232PortCT(0), s[i] +0x30);
- }
+ i = 0;
+ for(i = 0;'\0' != s[i];i++)
+ {
+ PalDataPortWrite(PalRS232PortCT(0), s[i]);
+ }
+
}
+
+void print_eol(void)
+{
+ PalDataPortWrite(PalRS232PortCT(0), 0x0A);
+ PalDataPortWrite(PalRS232PortCT(0), 0x0D);
+}
\ No newline at end of file diff --git a/Support_Libs/debug/debug.hch b/Support_Libs/debug/debug.hch index abd8bea..c2656f2 100644 --- a/Support_Libs/debug/debug.hch +++ b/Support_Libs/debug/debug.hch @@ -9,25 +9,25 @@ * This function will print the integer through the RS232 interface in a
* 32-bit hexadecimal representation.
* Pre: Value must be smaller or equal to 32-bits.
- * RS232 must be available.
- * Post: A hex representation of value is printed.
+ * Post: A hex representation of value is printed.
*
****************************************************************************/
void print_hex_value(unsigned value);
/****************************************************************************
*
- * print_string (unsigned 8 value[16])
+ * print_string (unsigned char *s)
*
* Arguments: (typical)
- * value: An array of characters.
+ * s: Pointer to an array containg a string top print.
*
* Description: (typical)
* This function will print a string through the RS232 interface.
- * Pre: Value must not be 16 characters in length. If less char's
- * are used, termination with \0 is recommended.
- * RS232 must be available.
- * Post: The string is printed as is.
+ * Pre: The array must be /0 terminated.
+ * Post: The string is printed as is.
*
****************************************************************************/
-void print_string(unsigned 8 s[16]);
+void print_string(unsigned char *s);
+
+
+void print_eol(void);
\ No newline at end of file |