summaryrefslogtreecommitdiffstats
path: root/api/user.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2011-06-28 13:40:27 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2011-06-28 13:40:27 (GMT)
commitfecdd9457cd3912c2b89aff1f99db0ba669af93b (patch)
tree34bbc7387ded825e303c3117b6c6da2cbe1fd771 /api/user.c
downloadAF903x_SRC-fecdd9457cd3912c2b89aff1f99db0ba669af93b.zip
AF903x_SRC-fecdd9457cd3912c2b89aff1f99db0ba669af93b.tar.gz
AF903x_SRC-fecdd9457cd3912c2b89aff1f99db0ba669af93b.tar.bz2
Initial checkin' of sourceball extracted from installer.
DRIVER_RELEASE_VERSION : v9.08.14.1 FW_RELEASE_VERSION : v8_8_63_0 API_RELEASE_VERSION : 200.20090402.0 Not sure what those version numbers relate to. Might be Driver, the actual driver (src) FW, the little bin file that is only a keymapping for the remote API, all the tuners or so from /api? No support for Asus U3100 mini (yet).
Diffstat (limited to 'api/user.c')
-rw-r--r--api/user.c142
1 files changed, 142 insertions, 0 deletions
diff --git a/api/user.c b/api/user.c
new file mode 100644
index 0000000..e266f45
--- /dev/null
+++ b/api/user.c
@@ -0,0 +1,142 @@
+#include "user.h"
+#include <linux/delay.h> //for Linux mdelay
+//#include <unistd.h>
+
+
+/**
+ * Variable of critical section
+ */
+
+Dword User_memoryCopy (
+ IN Demodulator* demodulator,
+ IN void* dest,
+ IN void* src,
+ IN Dword count
+) {
+ /*
+ * ToDo: Add code here
+ *
+ * //Pseudo code
+ * memcpy(dest, src, (size_t)count);
+ * return (0);
+ */
+ return (Error_NO_ERROR);
+}
+
+Dword User_delay (
+ IN Demodulator* demodulator,
+ IN Dword dwMs
+) {
+ /*
+ * ToDo: Add code here
+ *
+ * //Pseudo code
+ * delay(dwMs);
+ * return (0);
+ */
+ mdelay(dwMs); // for Linux
+ //sleep(dwMs);
+ return (Error_NO_ERROR);
+}
+
+
+Dword User_enterCriticalSection (
+ IN Demodulator* demodulator
+) {
+ /*
+ * ToDo: Add code here
+ *
+ * //Pseudo code
+ * return (0);
+ */
+ return (Error_NO_ERROR);
+}
+
+
+Dword User_leaveCriticalSection (
+ IN Demodulator* demodulator
+) {
+ /*
+ * ToDo: Add code here
+ *
+ * //Pseudo code
+ * return (0);
+ */
+ return (Error_NO_ERROR);
+}
+
+
+Dword User_mpegConfig (
+ IN Demodulator* demodulator
+) {
+ /*
+ * ToDo: Add code here
+ *
+ */
+ return (Error_NO_ERROR);
+}
+
+
+Dword User_busTx (
+ IN Demodulator* demodulator,
+ IN Dword bufferLength,
+ IN Byte* buffer
+) {
+ /*
+ * ToDo: Add code here
+ *
+ * //Pseudo code
+ * short i;
+ *
+ * start();
+ * write_i2c(uc2WireAddr);
+ * ack();
+ * for (i = 0; i < bufferLength; i++) {
+ * write_i2c(*(ucpBuffer + i));
+ * ack();
+ * }
+ * stop();
+ *
+ * // If no error happened return 0, else return error code.
+ * return (0);
+ */
+ return (Error_NO_ERROR);
+}
+
+
+Dword User_busRx (
+ IN Demodulator* demodulator,
+ IN Dword bufferLength,
+ OUT Byte* buffer
+) {
+ /*
+ * ToDo: Add code here
+ *
+ * //Pseudo code
+ * short i;
+ *
+ * start();
+ * write_i2c(uc2WireAddr | 0x01);
+ * ack();
+ * for (i = 0; i < bufferLength - 1; i++) {
+ * read_i2c(*(ucpBuffer + i));
+ * ack();
+ * }
+ * read_i2c(*(ucpBuffer + bufferLength - 1));
+ * nack();
+ * stop();
+ *
+ * // If no error happened return 0, else return error code.
+ * return (0);
+ */
+ return (Error_NO_ERROR);
+}
+
+
+Dword User_busRxData (
+ IN Demodulator* demodulator,
+ IN Dword bufferLength,
+ OUT Byte* buffer
+) {
+ return (Error_NO_ERROR);
+}