<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>http://wikigeii.iut-troyes.univ-reims.fr//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=10.57.63.230&amp;*</id>
		<title>troyesGEII - Contributions de l’utilisateur [fr]</title>
		<link rel="self" type="application/atom+xml" href="http://wikigeii.iut-troyes.univ-reims.fr//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=10.57.63.230&amp;*"/>
		<link rel="alternate" type="text/html" href="http://wikigeii.iut-troyes.univ-reims.fr//index.php?title=Sp%C3%A9cial:Contributions/10.57.63.230"/>
		<updated>2026-05-07T08:31:40Z</updated>
		<subtitle>Contributions de l’utilisateur</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>http://wikigeii.iut-troyes.univ-reims.fr//index.php?title=Commcarte.c&amp;diff=54</id>
		<title>Commcarte.c</title>
		<link rel="alternate" type="text/html" href="http://wikigeii.iut-troyes.univ-reims.fr//index.php?title=Commcarte.c&amp;diff=54"/>
				<updated>2012-12-10T14:47:40Z</updated>
		
		<summary type="html">&lt;p&gt;10.57.63.230 : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Cours:Tp_II|retour à la page précédente]]&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;commcarte.h&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 int openParPort(char * parport)&lt;br /&gt;
 {&lt;br /&gt;
   int errno, device;&lt;br /&gt;
   if ((device = open(parport, O_RDWR)) &amp;lt; 0)&lt;br /&gt;
   {&lt;br /&gt;
     fprintf(stderr,&amp;quot;Erreur à l'ouverture : %s (%d)\n&amp;quot;,&lt;br /&gt;
     strerror(errno),errno);&lt;br /&gt;
     return -1;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   if (ioctl(device, PPCLAIM) &amp;lt; 0)&lt;br /&gt;
   {&lt;br /&gt;
     fprintf(stderr,&amp;quot;Erreur d'accès : %s (%d)\n&amp;quot;,&lt;br /&gt;
     strerror(errno),errno);&lt;br /&gt;
     return -1;&lt;br /&gt;
   }&lt;br /&gt;
   return device;&lt;br /&gt;
 }&amp;lt;br&amp;gt;&lt;br /&gt;
 int ecrireParPortp(int device,unsigned char *val)&lt;br /&gt;
 {&lt;br /&gt;
   if (ioctl (device, PPWDATA, val) &amp;lt; 0)&lt;br /&gt;
   {&lt;br /&gt;
     fprintf(stderr,&amp;quot;erreur d'écriture : %s (%d)\n&amp;quot;,&lt;br /&gt;
     strerror(errno),errno);&lt;br /&gt;
     return -1;&lt;br /&gt;
   }&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&amp;lt;br&amp;gt;&lt;br /&gt;
 int ecrireParPort(int device,unsigned char val)&lt;br /&gt;
 {&lt;br /&gt;
   if (ioctl (device, PPWDATA, &amp;amp;val) &amp;lt; 0)&lt;br /&gt;
   {&lt;br /&gt;
     fprintf(stderr,&amp;quot;erreur d'écriture : %s (%d)\n&amp;quot;,&lt;br /&gt;
     strerror(errno),errno);&lt;br /&gt;
     return -1;&lt;br /&gt;
   }&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&amp;lt;br&amp;gt;&lt;br /&gt;
 int closeParPort(int device)&lt;br /&gt;
 {&lt;br /&gt;
   if (ioctl(device, PPRELEASE) &amp;lt; 0)&lt;br /&gt;
   {&lt;br /&gt;
     fprintf(stderr,&amp;quot;Erreur : %s (%d)\n&amp;quot;,&lt;br /&gt;
     strerror(errno),errno);&lt;br /&gt;
     return -1;&lt;br /&gt;
   }&lt;br /&gt;
   if(close(device) &amp;lt; 0)&lt;br /&gt;
   {&lt;br /&gt;
     fprintf(stderr,&amp;quot;Erreur de fermeture : %s (%d)\n&amp;quot;,&lt;br /&gt;
     strerror(errno),errno);&lt;br /&gt;
     return -1;&lt;br /&gt;
   }&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Cours:Tp_II|retour à la page précédente]]&lt;/div&gt;</summary>
		<author><name>10.57.63.230</name></author>	</entry>

	</feed>