aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libucsi/atsc/stt_section.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/libucsi/atsc/stt_section.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/libucsi/atsc/stt_section.c b/lib/libucsi/atsc/stt_section.c
new file mode 100644
index 0000000..23ddd76
--- /dev/null
+++ b/lib/libucsi/atsc/stt_section.c
@@ -0,0 +1,42 @@
+/*
+ * section and descriptor parser
+ *
+ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
+ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <libucsi/atsc/stt_section.h>
+
+struct atsc_stt_section *atsc_stt_section_codec(struct atsc_section_psip *psip)
+{
+ uint8_t *buf = (uint8_t *) psip;
+ size_t pos = sizeof(struct atsc_section_psip);
+ size_t len = section_ext_length(&(psip->ext_head));
+
+ if (len < sizeof(struct atsc_stt_section))
+ return NULL;
+
+ bswap32(buf + pos);
+ pos += 5;
+ bswap16(buf + pos);
+ pos += 2;
+
+ if (verify_descriptors(buf + pos, len - sizeof(struct atsc_stt_section)))
+ return NULL;
+
+ return (struct atsc_stt_section *) psip;
+}
t/commit/display.c?id=c501b39d5995b0dc42468f75172f35aa12244772&follow=1'>[lcd4linux @ 2000-04-28 05:19:55 by reinelt]reinelt5-12/+554 first release of the Beckmann+Egle driver git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@51 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-20[lcd4linux @ 2000-04-20 05:48:42 by reinelt]reinelt2-0/+18 added documentation to EXTRA_DIST so that they go into the tarball git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@50 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-19[lcd4linux @ 2000-04-19 04:44:20 by reinelt]reinelt1-2/+2 README for HD44780 driver git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@49 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-17[lcd4linux @ 2000-04-17 05:14:27 by reinelt]reinelt3-5/+119 added README.44780 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@48 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-15[lcd4linux @ 2000-04-15 16:56:52 by reinelt]reinelt7-58/+197 moved delay loops to udelay.c renamed -d (debugging) switch to -v (verbose) new switch -d to calibrate delay loop 'Delay' entry for HD44780 back again delay loops will not calibrate automatically, because this will fail with hich CPU load git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@47 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-15[lcd4linux @ 2000-04-15 11:56:35 by reinelt]reinelt4-10/+60 more debug messages git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@46 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-15[lcd4linux @ 2000-04-15 11:13:54 by reinelt]reinelt10-28/+144 added '-d' (debugging) switch added several debugging messages removed config entry 'Delay' for HD44780 driver delay loop for HD44780 will be calibrated automatically git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@45 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-13[lcd4linux @ 2000-04-13 06:09:52 by reinelt]reinelt5-54/+126 added BogoMips() to system.c (not used by now, maybe sometimes we can calibrate our delay loop with this value) added delay loop to HD44780 driver. It seems to be quite fast now. Hopefully no compiler will optimize away the delay loop! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@44 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-12[lcd4linux @ 2000-04-12 08:05:45 by reinelt]reinelt6-24/+535 first version of the HD44780 driver git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@43 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-10[lcd4linux @ 2000-04-10 04:40:53 by reinelt]reinelt5-31/+65 minor changes and cleanups git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@42 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-07[lcd4linux @ 2000-04-07 05:42:20 by reinelt]reinelt6-17/+266 UUCP style lockfiles for the serial port git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@41 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2000-04-05[lcd4linux @ 2000-04-05 05:58:36 by reinelt]reinelt4-17/+65 fixed bug in XWindow.c: union semun isn't defined with glibc-2.1 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@40 3ae390bd-cb1e-0410-b409-cd5a39f66f1f