mirror of
https://github.com/Architeuthis-Flux/Jumperless.git
synced 2025-01-31 12:13:42 +01:00
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
#ifndef MACHINECOMMANDS_H
|
|
#define MACHINECOMMANDS_H
|
|
|
|
#define NUMBEROFINSTRUCTIONS 16
|
|
|
|
enum machineModeInstruction
|
|
{
|
|
unknown = 0,
|
|
netlist,
|
|
getnetlist,
|
|
bridgelist,
|
|
getbridgelist,
|
|
lightnode,
|
|
lightnet,
|
|
getmeasurement,
|
|
gpio,
|
|
uart,
|
|
arduinoflash,
|
|
setnetcolor,
|
|
setnodecolor,
|
|
setsupplyswitch,
|
|
getsupplyswitch
|
|
};
|
|
|
|
extern char inputBuffer[INPUTBUFFERLENGTH];
|
|
extern char machineModeInstructionString[NUMBEROFINSTRUCTIONS][20];
|
|
|
|
enum machineModeInstruction parseMachineInstructions(int *sequenceNumber);
|
|
void machineModeRespond(int sequenceNumber, bool ok);
|
|
void machineNetlistToNetstruct(void);
|
|
void populateBridgesFromNodes(void);
|
|
int nodeTokenToInt(char *);
|
|
int findReplacement(char *name);
|
|
int removeHexPrefix(const char *);
|
|
|
|
void populateBridgesFromNodes(void);
|
|
|
|
void writeNodeFileFromInputBuffer(void);
|
|
|
|
void lightUpNodesFromInputBuffer(void);
|
|
|
|
void lightUpNetsFromInputBuffer(void);
|
|
|
|
void printSupplySwitch(int supplySwitchPos);
|
|
int setSupplySwitch(void);
|
|
|
|
void listNetsMachine(void);
|
|
void listBridgesMachine(void);
|
|
|
|
#endif
|