svn commit: r244895 - user/adrian/ath_radar_stuff/src/spectral_fft

Adrian Chadd adrian at FreeBSD.org
Mon Dec 31 06:53:04 UTC 2012


Author: adrian
Date: Mon Dec 31 06:53:03 2012
New Revision: 244895
URL: http://svnweb.freebsd.org/changeset/base/244895

Log:
  Break out the includes!

Added:
  user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.h
Modified:
  user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c

Modified: user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c
==============================================================================
--- user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c	Mon Dec 31 06:49:42 2012	(r244894)
+++ user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.c	Mon Dec 31 06:53:03 2012	(r244895)
@@ -30,47 +30,7 @@
 #include <SDL/SDL.h>
 #include <SDL/SDL_ttf.h>
 
-typedef int8_t s8;
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint64_t u64;
-
-/* taken from ath9k.h */
-#define SPECTRAL_HT20_NUM_BINS          56
-
-enum ath_fft_sample_type {
-        ATH_FFT_SAMPLE_HT20 = 0
-};
-
-struct fft_sample_tlv {
-        u8 type;        /* see ath_fft_sample */
-        u16 length;
-        /* type dependent data follows */
-} __attribute__((packed));
-
-struct fft_sample_ht20 {
-        struct fft_sample_tlv tlv;
-
-        u8 __alignment;
-
-        u16 freq;
-        s8 rssi;
-        s8 noise;
-
-        u16 max_magnitude;
-        u8 max_index;
-        u8 bitmap_weight;
-
-        u64 tsf;
-
-        u16 data[SPECTRAL_HT20_NUM_BINS];
-} __attribute__((packed));
-
-
-struct scanresult {
-	struct fft_sample_ht20 sample;
-	struct scanresult *next;
-};
+#include "fft_eval.h"
 
 #define WIDTH	1600
 #define HEIGHT	650

Added: user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/adrian/ath_radar_stuff/src/spectral_fft/fft_eval.h	Mon Dec 31 06:53:03 2012	(r244895)
@@ -0,0 +1,46 @@
+#ifndef	__FFT_EVAL_H__
+#define	__FFT_EVAL_H__
+
+typedef int8_t s8;
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint64_t u64;
+
+/* taken from ath9k.h */
+#define SPECTRAL_HT20_NUM_BINS          56
+
+enum ath_fft_sample_type {
+        ATH_FFT_SAMPLE_HT20 = 0
+};
+
+struct fft_sample_tlv {
+        u8 type;        /* see ath_fft_sample */
+        u16 length;
+        /* type dependent data follows */
+} __attribute__((packed));
+
+struct fft_sample_ht20 {
+        struct fft_sample_tlv tlv;
+
+        u8 __alignment;
+
+        u16 freq;
+        s8 rssi;
+        s8 noise;
+
+        u16 max_magnitude;
+        u8 max_index;
+        u8 bitmap_weight;
+
+        u64 tsf;
+
+        u16 data[SPECTRAL_HT20_NUM_BINS];
+} __attribute__((packed));
+
+
+struct scanresult {
+        struct fft_sample_ht20 sample;
+        struct scanresult *next;
+};
+
+#endif	/* __FFT_EVAL_H__ */


More information about the svn-src-user mailing list