You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
726 B
C
36 lines
726 B
C
1 month ago
|
#pragma once
|
||
|
|
||
|
#include "DSP28x_Project.h"
|
||
|
#include "DSP2833x_Device.h"
|
||
|
#include "Protocol/CAN.h"
|
||
|
#include "Protocol/CAN_data.h"
|
||
|
#include "Protocol/DigitalIO.h"
|
||
|
|
||
|
|
||
|
struct SoftwareVersion{
|
||
|
Uint16 DSP;
|
||
|
Uint16 CPLD;
|
||
|
};
|
||
|
|
||
|
class Periphery{
|
||
|
public:
|
||
|
Periphery();
|
||
|
void config();
|
||
|
Uint16 getVersionFPGA();
|
||
|
void updateVersionFPGA();
|
||
|
void processDigitalInput();
|
||
|
void processDigitalOutput();
|
||
|
void initExternalModbus();
|
||
|
void processExternalModbus(); // TODO
|
||
|
void processCPUModbus(); // TODO
|
||
|
|
||
|
private:
|
||
|
canSpace::CAN _canb;
|
||
|
interface::DigitalIO _digitalIO;
|
||
|
Uint16* _zone0_ptr;
|
||
|
|
||
|
SoftwareVersion _softVersion;
|
||
|
canSpace::CANMessage _modbusSettingsMsg;
|
||
|
bool _modbusInit;
|
||
|
};
|