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
c9bb1d7a
Commit
c9bb1d7a
authored
Aug 16, 2020
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chg: uCboard chip change support added !minor
parent
2430c7f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
src/boards/board_uCboard.cc
src/boards/board_uCboard.cc
+45
-0
src/boards/board_uCboard.h
src/boards/board_uCboard.h
+1
-0
No files found.
src/boards/board_uCboard.cc
View file @
c9bb1d7a
...
...
@@ -388,6 +388,51 @@ cboard_uCboard::Run_CPU(void)
}
int
cboard_uCboard
::
MInit
(
const
char
*
processor
,
const
char
*
fname
,
float
freq
)
{
int
ret
=
board_ucsim
::
MInit
(
processor
,
fname
,
freq
);
lxImage
image
;
switch
(
MGetPinCount
())
{
case
8
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic08.png"
));
break
;
case
14
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic14.png"
));
break
;
case
18
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic18.png"
));
break
;
case
20
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic20.png"
));
break
;
case
28
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic28.png"
));
break
;
case
40
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic40.png"
));
break
;
case
100
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic100.png"
));
break
;
default:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic40.png"
));
printf
(
"IC package with %i pins not found!
\n
"
,
MGetPinCount
());
break
;
}
if
(
micbmp
)
delete
micbmp
;
micbmp
=
new
lxBitmap
(
image
,
&
Window1
);
return
ret
;
}
//Register the board in PICSimLab
board_init
(
"uCboard"
,
cboard_uCboard
);
src/boards/board_uCboard.h
View file @
c9bb1d7a
...
...
@@ -43,6 +43,7 @@ class cboard_uCboard:public board_ucsim
//Called ever 100ms to draw board
void
Draw
(
CDraw
*
draw
,
double
scale
);
void
Run_CPU
(
void
);
int
MInit
(
const
char
*
processor
,
const
char
*
fname
,
float
freq
);
//Return a list of board supported microcontrollers
String
GetSupportedDevices
(
void
){
return
lxT
(
"C51,STM8S103,Z80,"
);};
//Return the filename of board picture
...
...
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