--- /dev/null
+/*
+ * Copyright (C) 2017 David Rowe
+ *
+ * All rights reserved
+ *
+ * Licensed under GNU LGPL V2.1
+ * See LICENSE file for information
+ */
+
+#ifndef CODEC2_OFDM_H
+#define CODEC2_OFDM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes */
+
+#include <complex.h>
+#include <stdbool.h>
+
+#include "comp.h"
+
+/* Defines */
+
+struct OFDM;
+
+/* Prototypes */
+
+struct OFDM *ofdm_create(float, float, int, float, float, int, int);
+void ofdm_destroy(struct OFDM *);
+int ofdm_errno(void);
+COMP *ofdm_mod(struct OFDM *ofdm, int *);
+int *ofdm_demod(struct OFDM *ofdm, COMP *);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2017 David Rowe
+ *
+ * All rights reserved
+ *
+ * Licensed under GNU LGPL V2.1
+ * See LICENSE file for information
+ */
+
+#ifndef OFDM_INTERNAL_H
+#define OFDM_INTERNAL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <complex.h>
+#include <stdbool.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846f /* math constant */
+#endif
+
+#define TAU (2.0f * M_PI) /* mathematical constant */
+
+/*
+ * QPSK Quadrant bit-pair values - Gray Coded
+ *
+ * 0.0 - 89.9 = 00
+ * 90.0 - 179.9 = 01
+ * 180.0 - 269.9 = 11
+ * 270.0 - 359.9 = 10
+ */
+const complex float constellation[] = {
+ 1.0f + 0.0f * I,
+ 0.0f + 1.0f * I,
+ 0.0f - 1.0f * I,
+ -1.0f + 0.0f * I
+};
+
+struct OFDM {
+ float Fs;
+ float Ts;
+ float Rs;
+ float Tcp;
+ float Ncp;
+ float Fcentre;
+ float foff_est_gain;
+ float foff_est_hz;
+
+ int Nbitsperframe;
+ int Nrowsperframe;
+ int Nsamperframe;
+ int Ns;
+ int Nc;
+ int M;
+ int bps;
+ int ftwindow_width;
+ int verbose;
+ int sample_point;
+ int timing_est;
+ int nin;
+ int Nrxbuf;
+
+ bool timing_en;
+ bool foff_est_en;
+ bool phase_est_en;
+
+ /* dynamic heap memory allocation */
+
+ complex float *rate_fs_pilot_samples;
+ complex float **W;
+ complex float *rxbuf;
+ float *w;
+ int *pilots;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif