26#ifndef BOARD_REMOTETCP_H
27#define BOARD_REMOTETCP_H
30#include "../devices/bitbang_i2c.h"
31#include "../devices/bitbang_spi.h"
32#include "../devices/bitbang_uart.h"
33#include "../lib/board.h"
38 uint32_t payload_size;
42enum { VB_PINFO = 1, VB_PWRITE, VB_PREAD, VB_PSTATUS, VB_QUIT, VB_SYNC, VB_LAST };
45#define TTIMEOUT (BASETIMER * 1000000L)
56 int MInit(
const char* processor,
const char* fname,
float freq)
override;
57 void MEnd(
void)
override;
63 void MSetVCC(
float vcc)
override;
68 void MSetPin(
int pin,
unsigned char value)
override;
69 void MSetPinDOV(
int pin,
unsigned char ovalue)
override;
70 void MSetAPin(
int pin,
float value)
override;
71 unsigned char MGetPin(
int pin)
override;
73 void MStep(
void)
override;
75 void MReset(
int flags)
override;
77 virtual void Run_CPU_ns(uint64_t time) = 0;
78 int GetInc_ns(
void) {
return inc_ns; };
79 int GetUARTRX(
const int uart_num)
override;
80 int GetUARTTX(
const int uart_num)
override;
81 virtual std::string
GetClkLabel(
void)
override {
return "IO (Mhz)"; };
84 const int TestConnection(
void);
85 const int DataAvaliable(
void);
86 void ConnectionError(
const char* s_error);
87 void Disconnect(
void);
88 void pins_reset(
void);
91 int32_t recv_payload(
char* buff,
const uint32_t payload_size);
92 int32_t send_cmd(
const uint32_t cmd,
const char* payload = NULL,
const uint32_t payload_size = 0);
101 unsigned int serialbaud;
108 unsigned short ADCvalues[16];
110 unsigned short Dirs[2] = {0xFF, 0xFF};
111 unsigned short Ports[2] = {0x00, 0x00};
112 unsigned short t0CNT = 0;
113 unsigned short t0STA = 0;
114 unsigned short t0CON = 0x7FFF;
115 unsigned short t0PR = 0xFFFF;
116 unsigned short t0iclk = 0;
118 int64_t timerlast = 0;
119 unsigned int inc_ns = 0;
120 unsigned int ns_count = 0;
Board class.
Definition board.h:111
Definition bsim_remote.h:47
int GetUARTRX(const int uart_num) override
Return the UART N RX pin number.
Definition bsim_remote.cc:772
int GetUARTTX(const int uart_num) override
Return the UART N TX pin number.
Definition bsim_remote.cc:779
int CpuInitialized(void) override
return true if microcontroller is initialized
Definition bsim_remote.cc:290
const picpin * MGetPinsValues(void) override
board microcontroller get all pins list struct
Definition bsim_remote.cc:709
void MEnd(void) override
board microcontroller end
Definition bsim_remote.cc:240
void MReset(int flags) override
board microcontroller reset
Definition bsim_remote.cc:689
void MSetVCC(float vcc) override
board microcontroller set vcc
Definition bsim_remote.cc:278
std::string MGetPinName(int pin) override
board microcontroller pin name
Definition bsim_remote.cc:296
void EndServers(void) override
board servers shutdown
Definition bsim_remote.cc:254
int DebugInit(int dtyppe) override
Start debug support.
Definition bsim_remote.cc:520
void MStep(void) override
board microcontroller run one step
Definition bsim_remote.cc:713
void MSetFreq(float freq) override
board microcontroller set frequency
Definition bsim_remote.cc:268
float MGetInstClockFreq(void) override
board microcontroller get cpu internal clock (in PIC frequency/4)
Definition bsim_remote.cc:286
float MGetFreq(void) override
board microcontroller get frequency
Definition bsim_remote.cc:274
void MSetSerial(const char *port) override
Set serial port name to use.
Definition bsim_remote.cc:96
virtual std::string GetClkLabel(void) override
Return the description of clk label.
Definition bsim_remote.h:81
void MSetAPin(int pin, float value) override
board microcontroller set analog pin
Definition bsim_remote.cc:598
int MInit(const char *processor, const char *fname, float freq) override
board microcontroller init
Definition bsim_remote.cc:103
void DebugLoop(void) override
debug step (pooling)
Definition bsim_remote.cc:294
int MDumpMemory(const char *fname) override
board microcontroller save non volatile memory to hex file
Definition bsim_remote.cc:508
void MSetPinDOV(int pin, unsigned char ovalue) override
board microcontroller set Default Open Value (external pull)
Definition bsim_remote.cc:594
unsigned char MGetPin(int pin) override
board microcontroller get digital pin value
Definition bsim_remote.cc:682
int MGetPinCount(void) override
board microcontroller pin count
Definition bsim_remote.cc:525
void MStepResume(void) override
board microcontroller run one or two steps to resume instruction
Definition bsim_remote.h:74
std::string GetDebugName(void) override
Get debug interface name.
Definition bsim_remote.h:52
float MGetVCC(void) override
board microcontroller get vcc
Definition bsim_remote.cc:282
int MGetArchitecture(void) override
Return board microcontroller architecture.
Definition bsim_remote.cc:250
void MSetPin(int pin, unsigned char value) override
board microcontroller set digital pin
Definition bsim_remote.cc:577
void MEraseFlash(void) override
board microcontroller erase flash memory (program)
Definition bsim_remote.cc:264
Definition bitbang_i2c.h:39
Definition bitbang_spi.h:35
Definition bitbang_uart.h:35