aboutsummaryrefslogtreecommitdiffstats
path: root/util/scan/dvb-c/de-Muenchen
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2013-09-03 09:48:40 +0200
committeretobi <git@e-tobi.net>2013-09-03 09:48:40 +0200
commit6b350466c4902c5b137e0efaf1d189128a7f18f5 (patch)
treea7cf91f9896c0f8c9d8b291114e51f1373940c70 /util/scan/dvb-c/de-Muenchen
parent6e40287e2f39a80fc72bd8d0fbc1a8334d688c2d (diff)
downloadlinux-dvb-apps-6b350466c4902c5b137e0efaf1d189128a7f18f5.tar.gz
Imported Upstream version 1.1.1upstream/1.1.1
Diffstat (limited to 'util/scan/dvb-c/de-Muenchen')
0 files changed, 0 insertions, 0 deletions
ss */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#define USAGE \
"\n" \
"\nTest sending the burst mini command A/B on a SAT frontend." \
"\n" \
"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX sendburst {a|b}" \
"\n"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <linux/dvb/frontend.h>


int main (int argc, char **argv)
{
   char *fedev = "/dev/dvb/adapter0/frontend0";
   int fd, r;

   if (argc != 2 || (strcmp(argv[1], "a") && strcmp(argv[1], "b"))) {
      fprintf (stderr, "usage: %s <a|b>\n" USAGE, argv[0]);
      return 1;
   }

   if (getenv("FRONTEND"))
	   fedev = getenv("FRONTEND");

   printf("set22k: using '%s'\n", fedev);

   if ((fd = open (fedev, O_RDWR)) < 0) {
      perror ("open");
      return 1;
   }

   ioctl (fd, FE_SET_TONE, SEC_TONE_OFF);

   usleep (30000);    /*  30ms according to DiSEqC spec  */

   if (strcmp(argv[1], "a") == 0)
      r = ioctl (fd, FE_DISEQC_SEND_BURST, SEC_MINI_A);
   else
      r = ioctl (fd, FE_DISEQC_SEND_BURST, SEC_MINI_B);

   if (r == -1)
      perror("ioctl FE_SET_TONE");

   close (fd);

   return 0;
}