Subversion Repositories shark

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1439 giacomo 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Giacomo Guidi       <giacomo@gandalf.sssup.it>
10
 *
11
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
12
 *
13
 * http://www.sssup.it
14
 * http://retis.sssup.it
15
 * http://shark.sssup.it
16
 */
17
 
18
#include "kernel/kern.h"
19
#include "rtdac4.h"
20
 
21
int main(int argc, char **argv)
22
{
23
 
24
  char buf_char[4];
25
  short buf_short[2];
26
  long prescaler;
27
 
28
  RTDAC4_open();
29
 
30
  RTDAC4_read_states(buf_char);
31
 
32
  buf_short[0] = 0;
33
  buf_short[1] = 0;
34
 
35
  RTDAC4_set_motor(buf_short);
36
 
37
  /* Reset encoders */
38
  RTDAC4_ioctl(1, 0);
39
 
40
  prescaler = 0;
41
 
42
  /* Set prescaler */
43
  RTDAC4_ioctl(2, prescaler);
44
 
45
  return 0;
46
 
47
}