Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picsimlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
picsimlab
Commits
ccf68ec9
Commit
ccf68ec9
authored
Aug 03, 2020
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chg: docs updated !minor
parent
d2c68866
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
728 additions
and
30 deletions
+728
-30
docs/devel/html/index.html
docs/devel/html/index.html
+697
-4
docs/devel/html/navtreedata.js
docs/devel/html/navtreedata.js
+2
-2
src/devices/mplabxd.cc
src/devices/mplabxd.cc
+25
-20
src/picsimlab1.h
src/picsimlab1.h
+4
-4
No files found.
docs/devel/html/index.html
View file @
ccf68ec9
This diff is collapsed.
Click to expand it.
docs/devel/html/navtreedata.js
View file @
ccf68ec9
...
...
@@ -31,8 +31,8 @@ var NAVTREE =
[
"
part_servo.cc
"
,
"
index.html#pcode
"
,
null
]
]
],
[
"
Board example
"
,
"
index.html#boardex
"
,
[
[
"
board
X
.h
"
,
"
index.html#binc
"
,
null
],
[
"
board
X
.cc
"
,
"
index.html#bcode
"
,
null
]
[
"
board
_x
.h
"
,
"
index.html#binc
"
,
null
],
[
"
board
_x
.cc
"
,
"
index.html#bcode
"
,
null
]
]
],
[
"
Classes
"
,
"
annotated.html
"
,
[
[
"
Class List
"
,
"
annotated.html
"
,
"
annotated_dup
"
],
...
...
src/devices/mplabxd.cc
View file @
ccf68ec9
...
...
@@ -91,7 +91,25 @@ typedef struct sockaddr sockaddr;
#define READI 0x75
#define READE 0x80
#ifdef _WIN_
__attribute__
((
constructor
))
static
void
initialize_socket
(
void
)
{
WSAStartup
(
wVersionRequested
,
&
wsaData
);
if
(
wsaData
.
wVersion
!=
wVersionRequested
)
{
fprintf
(
stderr
,
"
\n
Wrong version
\n
"
);
return
1
;
}
}
__attribute__
((
destructor
))
static
void
finalize_socket
(
void
)
{
WSACleanup
();
}
#endif
static
int
sockfd
=
-
1
;
static
int
listenfd
=
-
1
;
...
...
@@ -162,15 +180,6 @@ mplabxd_init(board * mboard, unsigned short tcpport)
if
(
!
server_started
)
{
dprint
(
"mplabxd_init
\n
"
);
#ifdef _WIN_
WSAStartup
(
wVersionRequested
,
&
wsaData
);
if
(
wsaData
.
wVersion
!=
wVersionRequested
)
{
fprintf
(
stderr
,
"
\n
Wrong version
\n
"
);
return
1
;
}
#endif
if
((
listenfd
=
socket
(
PF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
...
...
@@ -199,7 +208,7 @@ mplabxd_init(board * mboard, unsigned short tcpport)
return
1
;
}
server_started
=
1
;
ramsend
=
(
unsigned
char
*
)
malloc
(
dbg_board
->
DBGGetRAMSize
());
ramreceived
=
(
unsigned
char
*
)
malloc
(
dbg_board
->
DBGGetRAMSize
());
...
...
@@ -248,7 +257,7 @@ mplabxd_stop(void)
void
mplabxd_end
(
void
)
{
if
(
server_started
)
{
mplabxd_stop
();
...
...
@@ -261,10 +270,6 @@ mplabxd_end(void)
listenfd
=
-
1
;
server_started
=
0
;
dbg_board
=
NULL
;
#ifdef _WIN_
WSACleanup
();
#endif
}
...
...
@@ -447,12 +452,12 @@ mplabxd_loop(void)
}
dprint
(
"PROGD cmd
\n
"
);
uram
=
dbg_board
->
DBGGetRAM_p
();
for
(
i
=
0
;
i
<
(
int
)
dbg_board
->
DBGGetRAMSize
();
i
++
)
for
(
i
=
0
;
i
<
(
int
)
dbg_board
->
DBGGetRAMSize
();
i
++
)
{
if
(
ramsend
[
i
]
!=
ramreceived
[
i
])
if
(
ramsend
[
i
]
!=
ramreceived
[
i
])
{
uram
[
i
]
=
ramreceived
[
i
];
dprint
(
"PROGD cmd RAM %04X updated!
\n
"
,
i
);
uram
[
i
]
=
ramreceived
[
i
];
dprint
(
"PROGD cmd RAM %04X updated!
\n
"
,
i
);
}
}
break
;
...
...
@@ -522,7 +527,7 @@ mplabxd_loop(void)
reply
=
0x01
;
}
dprint
(
"address=%02X values=%i
\n
"
,
dbuff
[
0
],
dbuff
[
1
]);
if
(
send
(
sockfd
,
(
char
*
)
&
dbg_board
->
DBGGetRAM_p
()[
dbuff
[
0
]],
dbuff
[
1
],
0
)
!=
dbuff
[
1
])
if
(
send
(
sockfd
,
(
char
*
)
&
dbg_board
->
DBGGetRAM_p
()[
dbuff
[
0
]],
dbuff
[
1
],
0
)
!=
dbuff
[
1
])
{
printf
(
"send error : %s
\n
"
,
strerror
(
errno
));
ret
=
1
;
...
...
src/picsimlab1.h
View file @
ccf68ec9
...
...
@@ -39,10 +39,10 @@
* @include part_servo.cc
*
* @section boardex Board example
* @subsection binc board
X
.h
* @include board_
X
.h
* @subsection bcode board
X
.cc
* @include board_
X
.cc
* @subsection binc board
_x
.h
* @include board_
x
.h
* @subsection bcode board
_x
.cc
* @include board_
x
.cc
*
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment