diff options
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C')
| -rw-r--r-- | Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C new file mode 100644 index 0000000..0f00e81 --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C @@ -0,0 +1,10 @@ +typedef struct half_words_struct
+{ unsigned field1:16;
+ unsigned field2:16;
+} half_words;
+
+half_words max( half_words a, half_words b )
+{ half_words x;
+ x= (a.field1>b.field1) ? a : b;
+ return x;
+}
|
