PICSimLab - Programmable IC Simulator Laboratory 0.9.2
PICSimLab - API
Loading...
Searching...
No Matches
board_Curiosity_HPC.h
1/* ########################################################################
2
3 PICSimLab - Programmable IC Simulator Laboratory
4
5 ########################################################################
6
7 Copyright (c) : 2020 El-khadraouy Mohammed <mohammed.el-khadraouy@ecole.ensicaen.fr>
8 Copyright (c) : 2015-2024 Luis Claudio GambĂ´a Lopes <lcgamboa@yahoo.com>
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23
24 For e-mail suggestions : lcgamboa@yahoo.com
25 ######################################################################## */
26
27#ifndef BOARD_Curiosity_HPC_H
28#define BOARD_Curiosity_HPC_H
29
30#include "bsim_picsim.h"
31
32#define BOARD_Curiosity_HPC_Name "Curiosity HPC"
33
34// New board Class derived from board class defined in board.h
36private:
37 unsigned char p_BT[2]; // Button S1 and S2
38
39 unsigned char pot1;
40 unsigned char active;
41
42 unsigned char jmp[1]; // jumper
43
44 void RegisterRemoteControl(void) override;
45
46 unsigned char ic28pins;
47
48public:
49 // Return the board name
50 std::string GetName(void) override { return BOARD_Curiosity_HPC_Name; };
51 std::string GetAboutInfo(void) override {
52 return "El-khadraouy Mohammed\n<mohammed.el-khadraouy@ecole.ensicaen.fr>\nand L.C. Gamboa \n "
53 "<lcgamboa@yahoo.com>";
54 };
55 // Constructor called once on board creation
57 // Destructor called once on board destruction
59 // Called ever 100ms to draw board
60 void Draw(void) override;
61 void Run_CPU(void) override;
62 // Return a list of board supported microcontrollers
63 std::string GetSupportedDevices(void) override { return "PIC18F47K40,"; };
64 // Reset board status
65 void Reset(void) override;
66 // Event on the board
67 void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
68 // Event on the board
69 void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
70 // Event on the board
71 void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override;
72 // Event on the board
73 void EvKeyPress(unsigned int key, unsigned int mask) override;
74 // Event on the board
75 void EvKeyRelease(unsigned int key, unsigned int mask) override;
76 // Called ever 1s to refresh status
77 void RefreshStatus(void) override;
78 // Called to save board preferences in configuration file
79 void WritePreferences(void) override;
80 // Called whe configuration file load preferences
81 void ReadPreferences(char* name, char* value) override;
82 // return the input ids numbers of names used in input map
83 unsigned short GetInputId(char* name) override;
84 // return the output ids numbers of names used in output map
85 unsigned short GetOutputId(char* name) override;
86 // Set Serial port name
87 void MSetSerial(const char* port) override;
88};
89
90#endif /* BOARD_Curiosity_HPC_H */
Definition bsim_picsim.h:34
Definition board_Curiosity_HPC.h:35
void ReadPreferences(char *name, char *value) override
Called whe configuration file load preferences.
Definition board_Curiosity_HPC.cc:276
void EvKeyPress(unsigned int key, unsigned int mask) override
Event on the board.
Definition board_Curiosity_HPC.cc:306
std::string GetSupportedDevices(void) override
Return a list of supported microcontrollers.
Definition board_Curiosity_HPC.h:63
std::string GetName(void) override
Get board name registered in PICSimLab.
Definition board_Curiosity_HPC.h:50
void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event on the board.
Definition board_Curiosity_HPC.cc:386
void RegisterRemoteControl(void) override
Register remote control variables.
Definition board_Curiosity_HPC.cc:222
unsigned short GetOutputId(char *name) override
return the output ids numbers of names used in output map
Definition board_Curiosity_HPC.cc:88
void Run_CPU(void) override
Paralle thread called ever 100ms to run cpu code.
Definition board_Curiosity_HPC.cc:604
unsigned short GetInputId(char *name) override
return the input ids numbers of names used in input map
Definition board_Curiosity_HPC.cc:66
std::string GetAboutInfo(void) override
Return the about information of part.
Definition board_Curiosity_HPC.h:51
void Draw(void) override
Called ever 100ms to draw board.
Definition board_Curiosity_HPC.cc:446
void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event on the board.
Definition board_Curiosity_HPC.cc:406
void WritePreferences(void) override
Called to save board preferences in configuration file.
Definition board_Curiosity_HPC.cc:263
void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
Event on the board.
Definition board_Curiosity_HPC.cc:330
void Reset(void) override
Reset board status.
Definition board_Curiosity_HPC.cc:178
void MSetSerial(const char *port) override
Set serial port name to use.
Definition board_Curiosity_HPC.cc:169
void RefreshStatus(void) override
Called ever 1s to refresh status.
Definition board_Curiosity_HPC.cc:247
void EvKeyRelease(unsigned int key, unsigned int mask) override
Event on the board.
Definition board_Curiosity_HPC.cc:318