@@ -10,7 +10,6 | |||||
10 | <body onload='searchBox.OnSelectItem(0);'> |
|
10 | <body onload='searchBox.OnSelectItem(0);'> | |
11 | <div id="wrap"> |
|
11 | <div id="wrap"> | |
12 | <div id="header"> |
|
12 | <div id="header"> | |
13 | <h1><a name="Free_VHDL_library" /><a href="../../">Free |
|
13 | <h1><a href="../../" TARGET="_top">Free VHDL library<br /> | |
14 | VHDL library<br /> |
|
|||
15 | </a></h1> |
|
14 | </a></h1> | |
16 | </div> |
|
15 | </div> |
@@ -17,35 +17,15 | |||||
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | #include "stdio.h" |
|
19 | #include "stdio.h" | |
|
20 | //remember to include: | |||
20 | #include "lpp_apb_functions.h" |
|
21 | #include "lpp_apb_functions.h" | |
21 |
|
22 | |||
22 |
|
23 | |||
23 |
|
24 | |||
24 | int main() |
|
25 | int main() | |
25 | { |
|
26 | { | |
26 | int d=0; |
|
27 | //to print devices lilst | |
27 | while(d!=10) |
|
|||
28 | { |
|
|||
29 | scanf("%d",&d); |
|
|||
30 | switch(d) |
|
|||
31 | { |
|
|||
32 | case 0: |
|
|||
33 | printf("cursor OFF \n"); |
|
|||
34 | break; |
|
|||
35 | case 1: |
|
|||
36 | printf("cursor ON \n"); |
|
|||
37 | break; |
|
|||
38 | case 2: |
|
|||
39 | break; |
|
|||
40 | case 3: |
|
|||
41 |
|
|
28 | apbprintdeviceslist(); | |
42 | break; |
|
29 | //if you whant to get a second device with 0x01/0x02 as VID/PID | |
43 | case 10: |
|
30 | int * dev = apbgetdevice(0x02, 0x01, 1); | |
44 | return 0; |
|
|||
45 | break; |
|
|||
46 | default: |
|
|||
47 | break; |
|
|||
48 | } |
|
31 | } | |
49 | } |
|
|||
50 | return 0; |
|
|||
51 | } |
|
@@ -125,6 +125,7 void apbprintdeviceinfo(struct apbdevinf | |||||
125 |
|
125 | |||
126 | This function list all devices on APB bus and print theirs informations. |
|
126 | This function list all devices on APB bus and print theirs informations. | |
127 |
|
127 | |||
|
128 | \example scanAPB.c | |||
128 | */ |
|
129 | */ | |
129 | void apbprintdeviceslist(); |
|
130 | void apbprintdeviceslist(); | |
130 |
|
131 |
General Comments 0
You need to be logged in to leave comments.
Login now