Hardware Design: SIE
Sign in or create your account | Project List | Help
Hardware Design: SIE Git Source Tree
Root/
1 | /* JTAG GNU/Linux parport device io |
2 | |
3 | Copyright (C) 2005 Andres Calderon |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
9 | |
10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
18 | |
19 | #include <stdio.h> |
20 | #include <fcntl.h> |
21 | #include <unistd.h> |
22 | #include <sys/types.h> |
23 | #include <sys/ioctl.h> |
24 | #include <sys/mman.h> |
25 | |
26 | #include "sakcXCProgrammer.h" |
27 | |
28 | using namespace std; |
29 | |
30 | /* |
31 | WE1 TDI PC24 |
32 | SDA TMS PD23 |
33 | SCK TDO PD24 |
34 | TCK PD28 |
35 | */ |
36 | |
37 | sakcXCProgrammer::sakcXCProgrammer() : IOBase() |
38 | { |
39 | JZ_PIO * pio = jz_gpio_map (); |
40 | |
41 | jz_gpio_as_input (JZ_GPIO_PORT_D, TDO); |
42 | jz_gpio_as_output (JZ_GPIO_PORT_D, TCK); |
43 | jz_gpio_as_output (JZ_GPIO_PORT_C, TDI); |
44 | jz_gpio_as_output (JZ_GPIO_PORT_D, TMS); |
45 | |
46 | error = (pio) ? false : true; |
47 | } |
48 | |
49 | sakcXCProgrammer::~sakcXCProgrammer() |
50 | { |
51 | } |
52 |
Branches:
master