This is the documentation to explain the use of picsimlab internal classes.
The main objective of this domentation is to enable the expansion of the simulator with the creation of new boards (board) and parts (part).
#define _USE_MATH_DEFINES
#include "output_step.h"
#include "../lib/oscilloscope.h"
#include "../lib/picsimlab.h"
#include "../lib/spareparts.h"
#include "math.h"
enum { O_P1, O_P2, O_P3, O_P4, O_P5, O_L1, O_L2, O_L3, O_L4, O_ROT, O_STEPS };
static PCWProp pcwprop[6] = {{PCW_COMBO,
"Pin 1"}, {PCW_COMBO,
"Pin 2"}, {PCW_COMBO,
"Pin 3"},
{PCW_COMBO, "Pin 4"}, {PCW_COMBO, "Home"}, {PCW_END, ""}};
const int id_)
:
part(x, y, name, type, pboard_, id_) {
angle = 0;
steps = 0;
input_pins[0] = 0;
input_pins[1] = 0;
input_pins[2] = 0;
input_pins[3] = 0;
output_pins[0] = 0;
input[0] = 0;
input[1] = 0;
turns = 0;
SetPCWProperties(pcwprop);
PinCount = 4;
Pins = input_pins;
}
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_FREEBITMAP, .FreeBitmap{
BitmapId}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_DESTROY});
}
float x2, y2;
const picpin* ppins = SpareParts.GetPinsValues();
case O_P1:
case O_P2:
case O_P3:
case O_P4:
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETCOLOR, .SetColor{49, 61, 99}});
SpareParts.CanvasCmd(
.cmd = CC_RECTANGLE,
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETFGCOLOR, .SetFgColor{255, 255, 255}});
SpareParts.CanvasCmd(
{.partn =
id, .cmd = CC_ROTATEDTEXT, .RotatedText{
"NC",
output[i].x1,
output[i].y1, 0}});
else
SpareParts.CanvasCmd({.partn =
id,
.cmd = CC_ROTATEDTEXT,
break;
case O_P5:
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETCOLOR, .SetColor{49, 61, 99}});
SpareParts.CanvasCmd(
.cmd = CC_RECTANGLE,
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETFGCOLOR, .SetFgColor{255, 255, 255}});
SpareParts.CanvasCmd(
{.partn =
id, .cmd = CC_ROTATEDTEXT, .RotatedText{
"NC",
output[i].x1,
output[i].y1, 0}});
else
SpareParts.CanvasCmd({.partn =
id,
.cmd = CC_ROTATEDTEXT,
break;
case O_STEPS: {
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETCOLOR, .SetColor{49, 61, 99}});
SpareParts.CanvasCmd(
.cmd = CC_RECTANGLE,
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETFGCOLOR, .SetFgColor{255, 255, 255}});
char text[100];
snprintf(text, 100, "S=%5.1f", steps);
SpareParts.CanvasCmd(
{.partn =
id, .cmd = CC_ROTATEDTEXT, .RotatedText{text,
output[i].x1,
output[i].y1, 0}});
snprintf(text, 100, "T=%3i", turns);
SpareParts.CanvasCmd(
{.partn =
id, .cmd = CC_ROTATEDTEXT, .RotatedText{text,
output[i].x1,
output[i].y1 + 12, 0}});
} break;
case O_ROT:
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETCOLOR, .SetColor{77, 77, 77}});
SpareParts.CanvasCmd(
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETFGCOLOR, .SetFgColor{0, 0, 0}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETBGCOLOR, .SetBgColor{250, 250, 250}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_CIRCLE, .Circle{1,
output[i].x1,
output[i].y1,
output[i].r}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETBGCOLOR, .SetBgColor{55, 55, 55}});
SpareParts.CanvasCmd(
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETLINEWIDTH, .SetLineWidth{8}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_LINE, .Line{
output[i].x1,
output[i].y1, x2, y2}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETLINEWIDTH, .SetLineWidth{6}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETFGCOLOR, .SetFgColor{77, 77, 77}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_LINE, .Line{
output[i].x1,
output[i].y1, x2, y2}});
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETLINEWIDTH, .SetLineWidth{1}});
break;
case O_L1:
case O_L2:
case O_L3:
case O_L4:
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETFGCOLOR, .SetFgColor{0, 0, 0}});
SpareParts.CanvasCmd(
.cmd = CC_SETBGCOLOR,
.SetBgColor{(
unsigned int)ppins[
input_pins[
output[i].
id - O_L1] - 1].oavalue, 0, 0}});
} else {
SpareParts.CanvasCmd({.partn =
id, .cmd = CC_SETBGCOLOR, .SetBgColor{55, 0, 0}});
}
DrawLED(
id, SpareParts.CanvasCmd, &
output[i]);
break;
}
}
if ((steps == 0) && (turns == 0)) {
} else {
}
}
}
#define STEP (1.8 * M_PI / 180.0)
#define HSTEP (STEP / 2.0)
#define NSTEP 200
#define S1 1
#define S12 3
#define S2 2
#define S23 6
#define S3 4
#define S34 12
#define S4 8
#define S41 9
const picpin* ppins = SpareParts.GetPinsValues();
input[1] = input[0];
if (input[0] ^ input[1]) {
switch (input[0]) {
case S1:
switch (input[1]) {
case S4:
steps += 1;
break;
case S2:
steps -= 1;
break;
case S41:
steps += 0.5;
break;
case S12:
steps -= 0.5;
break;
}
break;
case S2:
switch (input[1]) {
case S1:
steps += 1;
break;
case S3:
steps -= 1;
break;
case S12:
steps += 0.5;
break;
case S23:
steps -= 0.5;
break;
}
break;
case S3:
switch (input[1]) {
case S2:
steps += 1;
break;
case S4:
steps -= 1;
break;
case S23:
steps += 0.5;
break;
case S34:
steps -= 0.5;
break;
}
break;
case S4:
switch (input[1]) {
case S3:
steps += 1;
break;
case S1:
steps -= 1;
break;
case S34:
steps += 0.5;
break;
case S41:
steps -= 0.5;
break;
}
break;
case S12:
switch (input[1]) {
case S41:
steps += 1;
break;
case S23:
steps -= 1;
break;
case S1:
steps += 0.5;
break;
case S2:
steps -= 0.5;
break;
}
break;
case S23:
switch (input[1]) {
case S12:
steps += 1;
break;
case S34:
steps -= 1;
break;
case S2:
steps += 0.5;
break;
case S3:
steps -= 0.5;
break;
}
break;
case S34:
switch (input[1]) {
case S23:
steps += 1;
break;
case S41:
steps -= 1;
break;
case S3:
steps += 0.5;
break;
case S4:
steps -= 0.5;
break;
}
break;
case S41:
switch (input[1]) {
case S34:
steps += 1;
break;
case S12:
steps -= 1;
break;
case S4:
steps += 0.5;
break;
case S1:
steps -= 0.5;
break;
}
break;
default:
input[0] = input[1];
return;
break;
}
if (steps >= NSTEP) {
steps -= NSTEP;
turns++;
}
if (steps < 0) {
steps += NSTEP;
turns--;
}
angle = STEP * steps;
if ((steps == 0) && (turns == 0)) {
} else {
}
}
}
}
}
const picpin* ppins = SpareParts.GetPinsValues();
for (int i = 0; i < 4; i++) {
}
}
}
}
printf("Error input '%s' don't have a valid id! \n", name);
return INVALID_ID;
}
if (strcmp(name, "PN_1") == 0)
return O_P1;
if (strcmp(name, "PN_2") == 0)
return O_P2;
if (strcmp(name, "PN_3") == 0)
return O_P3;
if (strcmp(name, "PN_4") == 0)
return O_P4;
if (strcmp(name, "PN_5") == 0)
return O_P5;
if (strcmp(name, "LD_1") == 0)
return O_L1;
if (strcmp(name, "LD_2") == 0)
return O_L2;
if (strcmp(name, "LD_3") == 0)
return O_L3;
if (strcmp(name, "LD_4") == 0)
return O_L4;
if (strcmp(name, "DG_ROT") == 0)
return O_ROT;
if (strcmp(name, "DI_STEPS") == 0)
return O_STEPS;
printf("Error output '%s' don't have a valid id! \n", name);
return INVALID_ID;
}
char prefs[256];
sprintf(prefs,
"%hhu,%hhu,%hhu,%hhu,%hhu",
input_pins[0],
input_pins[1],
input_pins[2],
input_pins[3],
return prefs;
}
}
}
}
}
std::string GetPinName(unsigned char pin)
Return the name of one pin.
Definition spareparts.cc:154
output_t output[MAX_IDS]
output map elements
Definition part.h:383
output_t * output_ids[MAX_IDS]
output map elements by id order
Definition part.h:384
int BitmapId
Internal Bitmap.
Definition part.h:391
int id
part ID
Definition part.h:380
#include "board_x.h"
#include <math.h>
#include "../lib/oscilloscope.h"
#include "../lib/picsimlab.h"
#include "../lib/spareparts.h"
enum {
I_POT1,
I_ICSP,
I_PWR,
I_RST,
I_BD0,
I_SD1
};
enum {
O_POT1,
O_RST,
O_SD1,
O_LD0,
O_LD1,
O_LPWR,
O_RB0,
O_RB1,
O_BD0,
O_CPU
};
enum { PWM0 = 1, PWM1 };
if (strcmp(name, "PG_ICSP") == 0)
return I_ICSP;
if (strcmp(name, "SW_PWR") == 0)
return I_PWR;
if (strcmp(name, "PB_RST") == 0)
return I_RST;
if (strcmp(name, "PB_D0") == 0)
return I_BD0;
if (strcmp(name, "SW_D1") == 0)
return I_SD1;
if (strcmp(name, "PO_1") == 0)
return I_POT1;
printf("Error input '%s' don't have a valid id! \n", name);
return INVALID_ID;
}
if (strcmp(name, "SW_D1") == 0)
return O_SD1;
if (strcmp(name, "LD_LD0") == 0)
return O_LD0;
if (strcmp(name, "LD_LD1") == 0)
return O_LD1;
if (strcmp(name, "LD_LPWR") == 0)
return O_LPWR;
if (strcmp(name, "LD_RB1") == 0)
return O_RB1;
if (strcmp(name, "LD_RB0") == 0)
return O_RB0;
if (strcmp(name, "PB_D0") == 0)
return O_BD0;
if (strcmp(name, "PO_1") == 0)
return O_POT1;
if (strcmp(name, "PB_RST") == 0)
return O_RST;
if (strcmp(name, "IC_CPU") == 0)
return O_CPU;
printf("Error output '%s' don't have a valid id! \n", name);
return INVALID_ID;
}
cboard_x::cboard_x(void) {
pot1 = 100;
active = 0;
PICSimLab.UpdateGUI(PWM0, GT_GAUGE, GA_ADD, (void*)"*RB0");
PICSimLab.UpdateGUI(PWM1, GT_GAUGE, GA_ADD, (void*)"*RB1");
SWBounce_init(&bounce, 2);
}
cboard_x::~cboard_x(void) {
PICSimLab.UpdateGUI(PWM0, GT_GAUGE, GA_DEL, NULL);
PICSimLab.UpdateGUI(PWM1, GT_GAUGE, GA_DEL, NULL);
SWBounce_end(&bounce);
}
p_BT1 = 1;
PICSimLab.UpdateStatus(PS_SERIAL, GetUARTStrStatus(0));
SpareParts.Reset();
}
}
PICSimLab.
SavePrefs(
"X_bt2", std::to_string(p_BT2));
PICSimLab.
SavePrefs(
"X_clock", FloatStrFormat(
"%2.1f", PICSimLab.GetClock()));
PICSimLab.
SavePrefs(
"X_pot1", std::to_string(pot1));
}
if (!strcmp(name, "X_bt2")) {
if (value[0] == '0')
p_BT2 = 0;
else
p_BT2 = 1;
}
if (!strcmp(name, "X_proc")) {
}
if (!strcmp(name, "X_clock")) {
PICSimLab.SetClock(atof(value));
}
if (!strcmp(name, "X_pot1")) {
pot1 = atoi(value);
}
if (!strcmp(name, "X_PWActivePrj")) {
}
if (!strcmp(name, "X_PWPrjType")) {
}
}
if (key == '1') {
p_BT1 = 0;
}
if (key == '2') {
p_BT2 ^= 1;
}
}
if (key == '1') {
p_BT1 = 1;
}
}
int i;
for (i = 0; i <
inputc; i++) {
case I_ICSP:
PICSimLab.OpenLoadHexFileDialog();
;
break;
case I_PWR:
{
p_BT1 = 1;
} else
{
}
break;
case I_RST:
{
}
break;
case I_BD0:
p_BT1 = 0;
break;
case I_SD1:
p_BT2 ^= 1;
break;
case I_POT1: {
active = 1;
pot1 = (x -
input[i].x1) * 2.77;
if (pot1 > 199)
pot1 = 199;
} break;
}
}
}
}
int i;
for (i = 0; i <
inputc; i++) {
case I_POT1:
if (active) {
pot1 = (x -
input[i].x1) * 2.77;
if (pot1 > 199)
pot1 = 199;
}
} else {
active = 0;
}
break;
}
}
}
int i;
for (i = 0; i <
inputc; i++) {
case I_RST:
{
}
}
break;
case I_BD0:
p_BT1 = 1;
break;
case I_POT1: {
active = 0;
} break;
}
}
}
}
int update = 0;
int i;
{
{
if (!update) {
PICSimLab.CanvasCmd({.cmd = CC_INIT, .Init{Scale, Scale, 0}});
PICSimLab.CanvasCmd({.cmd = CC_SETFONTWEIGHT, .SetFontWeight{CC_FONTWEIGHT_BOLD}});
}
update++;
{
{
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR, .SetBgColor{255, 255, 255}});
PICSimLab.CanvasCmd({.cmd = CC_RECTANGLE,
if (!p_BT2)
{
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR, .SetBgColor{70, 70, 70}});
PICSimLab.CanvasCmd(
{.cmd = CC_RECTANGLE,
} else
{
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR, .SetBgColor{70, 70, 70}});
PICSimLab.CanvasCmd({.cmd = CC_RECTANGLE,
}
}
else if (
output[i].
id == O_BD0) {
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{102, 102, 102}});
PICSimLab.CanvasCmd({.cmd = CC_CIRCLE, .Circle{1,
output[i].cx,
output[i].cy, 10}});
if (p_BT1) {
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{15, 15, 15}});
} else {
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{55, 55, 55}});
}
PICSimLab.CanvasCmd({.cmd = CC_CIRCLE, .Circle{1,
output[i].cx,
output[i].cy, 8}});
}
else if (
output[i].
id == O_RST) {
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{102, 102, 102}});
PICSimLab.CanvasCmd({.cmd = CC_CIRCLE, .Circle{1,
output[i].cx,
output[i].cy, 10}});
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{15, 15, 15}});
} else {
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{55, 55, 55}});
}
PICSimLab.CanvasCmd({.cmd = CC_CIRCLE, .Circle{1,
output[i].cx,
output[i].cy, 8}});
}
else if (
output[i].
id == O_POT1) {
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{0, 50, 215}});
PICSimLab.CanvasCmd({.cmd = CC_RECTANGLE,
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{250, 250, 250}});
PICSimLab.CanvasCmd(
{.cmd = CC_RECTANGLE, .Rectangle{1,
output[i].x1 + pot1 / 2.77f,
output[i].y1 + 2, 10, 15}});
}
else if (
output[i].
id == O_CPU) {
PICSimLab.CanvasCmd({.cmd = CC_SETFONTSIZE, .SetFontSize{10}});
float x, y;
int w, h;
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{26, 26, 26}});
PICSimLab.CanvasCmd({.cmd = CC_RECTANGLE,
PICSimLab.CanvasCmd({.cmd = CC_SETCOLOR, .SetColor{230, 230, 230}});
x =
output[i].x1 + (w / 2) + 7;
PICSimLab.CanvasCmd({.cmd = CC_ROTATEDTEXT, .RotatedText{
Proc.c_str(), x, y, 270}});
}
} else
{
PICSimLab.CanvasCmd({.cmd = CC_SETFGCOLOR, .SetFgColor{0, 0, 0}});
{
case O_LD0:
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR,
.SetBgColor{(unsigned int)pins[18].oavalue, (unsigned int)pins[18].oavalue,
(unsigned int)pins[18].oavalue}});
break;
case O_LD1:
PICSimLab.CanvasCmd(
{.cmd = CC_SETBGCOLOR,
.SetBgColor{(unsigned int)pins[19].oavalue, (unsigned int)pins[19].oavalue, 0}});
break;
case O_LPWR:
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR,
.SetBgColor{0, 0, (
unsigned int)(200 * PICSimLab.
GetMcuPwr() + 55)}});
break;
case O_RB0:
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR, .SetBgColor{0, (unsigned int)pins[32].oavalue, 0}});
break;
case O_RB1:
PICSimLab.CanvasCmd({.cmd = CC_SETBGCOLOR, .SetBgColor{(unsigned int)pins[33].oavalue, 0, 0}});
break;
}
DrawLED(0, PICSimLab.CanvasCmd, &
output[i]);
}
}
}
if (update) {
PICSimLab.CanvasCmd({.cmd = CC_END});
}
int value = (pins[33].oavalue - 55) / 2;
PICSimLab.UpdateGUI(PWM0, GT_GAUGE, GA_SET, (void*)&value);
value = (pins[32].oavalue - 55) / 2;
PICSimLab.UpdateGUI(PWM1, GT_GAUGE, GA_SET, (void*)&value);
}
int i;
int j;
unsigned char pi;
const picpin* pins;
unsigned int alm[40];
int bret;
const long int NSTEP = PICSimLab.GetNSTEP();
memset(alm, 0, 40 * sizeof(unsigned int));
unsigned char p_BT1_ = p_BT1;
unsigned char p_BT2_ = p_BT2;
if ((pins[19 - 1].dir == PD_IN) && (pins[19 - 1].value != p_BT1_)) {
SWBounce_bounce(&bounce, 0);
}
if ((pins[20 - 1].dir == PD_IN) && (pins[20 - 1].value != p_BT2_)) {
SWBounce_bounce(&bounce, 1);
}
j = JUMPSTEPS;
pi = 0;
for (i = 0; i < NSTEP; i++)
{
if (j >= JUMPSTEPS)
{
if (!bounce.do_bounce) {
}
}
if (bounce.do_bounce) {
bret = SWBounce_process(&bounce);
if (bret) {
if (bounce.bounce[0]) {
if (bret == 1) {
} else {
}
}
if (bounce.bounce[1]) {
if (bret == 1) {
} else {
}
}
}
}
if (!mplabxd_testbp())
alm[pi] += pins[pi].value;
pi++;
pi = 0;
if (j >= JUMPSTEPS)
{
j = -1;
}
j++;
}
}
if (
output_ids[O_LD0]->value != pins[18].oavalue) {
}
if (
output_ids[O_LD1]->value != pins[19].oavalue) {
}
if (
output_ids[O_RB0]->value != pins[32].oavalue) {
}
if (
output_ids[O_RB1]->value != pins[33].oavalue) {
}
}
void SetSample(void)
Sample and update oscilloscope data aquisition.
Definition oscilloscope.cc:65
void SetMcuRst(int pr)
Set mcu rst flag (inform simulator about mcu reset state).
Definition picsimlab.h:128
int GetMcuRst(void)
Retunr if microcontroller reset pin is enabled.
Definition picsimlab.h:108
void SetMcuPwr(int pp)
Set the power status of microcontroller ON/OFF.
Definition picsimlab.h:115
int GetMcuPwr(void)
Return actual power status of microcontroller ON/OFF.
Definition picsimlab.h:103
int GetJUMPSTEPS(void)
Get the number of steps to be skipped in board update.
Definition picsimlab.h:90
board * GetBoard(void)
Return a pointer to board object.
Definition picsimlab.h:96
void SavePrefs(std::string name, std::string value)
Save the preferences.
Definition picsimlab.cc:259
void Process(void)
Execute the process code of spare parts N times (where N is the number of steps in 100ms).
Definition spareparts.cc:571
void PostProcess(void)
Execute the post process code of spare parts one time per 100ms.
Definition spareparts.cc:591
void PreProcess(void)
Execute the pre process code of spare parts one time per 100ms.
Definition spareparts.cc:546
output_t output[MAX_IDS]
output map elements
Definition board.h:729
input_t * input_ids[MAX_IDS]
input map elements by id order
Definition board.h:728
int use_oscope
use oscilloscope window
Definition board.h:733
virtual float MGetInstClockFreq(void)=0
board microcontroller get cpu internal clock (in PIC frequency/4)
void SetPWProjectType(std::string type)
Set the active project type created by Project Wizard.
Definition board.h:712
void InstCounterInc(void)
Increment the Intructions Counter.
Definition board.cc:403
int outputc
output map elements counter
Definition board.h:732
output_t * output_ids[MAX_IDS]
output map elements by id order
Definition board.h:730
unsigned char p_RST
board /RESET pin state
Definition board.h:735
std::string GetPWActiveProject(void)
Return the active project created by Project Wizard.
Definition board.h:697
input_t input[MAX_IDS]
input map elements
Definition board.h:727
virtual int MReset(int flags)=0
board microcontroller reset
std::string GetPWProjectType(void)
Return the active project type created by Project Wizard.
Definition board.h:707
int use_spare
use spare parts window
Definition board.h:734
void SetPWActiveProject(std::string path)
Set the active project created by Project Wizard.
Definition board.h:702
int inputc
input map elements counter
Definition board.h:731
void ReadMaps(void)
Read maps.
Definition board.cc:64
std::string Proc
Name of processor in use.
Definition board.h:725
int MGetPinCount(void) override
board microcontroller pin count
Definition bsim_picsim.cc:158
void MSetAPin(int pin, float value) override
board microcontroller set analog pin
Definition bsim_picsim.cc:183
void MSetPin(int pin, unsigned char value) override
board microcontroller set digital pin
Definition bsim_picsim.cc:171
void MSetPinOAV(int pin, float value) override
board microcontroller set digital pin output average value
Definition bsim_picsim.cc:179
int MGetResetPin(void) override
Get the Reset pin of microcontroller.
Definition bsim_picsim.cc:213
const picpin * MGetPinsValues(void) override
board microcontroller get all pins list struct
Definition bsim_picsim.cc:191
float * MGetPinOAVPtr(int pin) override
board microcontroller get pointer to digital pin average value
Definition bsim_picsim.cc:195
void MStep(void) override
board microcontroller run one step
Definition bsim_picsim.cc:199
void MClearIOUpdated(void) override
clear microcontroler status IO updated
Definition bsim_picsim.cc:221
int MGetIOUpdated(void) override
get microcontroler status IO updated
Definition bsim_picsim.cc:217
int MReset(int flags) override
board microcontroller reset
Definition bsim_picsim.cc:208