eeprom-programmer/firmware/src/parsing.h

22 lines
571 B
C

#ifndef PARSING_H_
#define PARSING_H_
#include "common.h"
#include <stdbool.h>
// Type definition for a command line with optional argument (actually just two pointers to strings)
typedef struct {
char* command;
char* arg;
} CommandLine;
void parseNextCommand();
CommandLine readNextCommand(char* buffer, uint8_t bufferLength);
CommandLine tokenizeCommand(char* cmd);
bool parseSingleAddressTo(char* addressStr, address_t* address);
AddressRange parseSingleAddress(char* addressStr);
AddressRange parseAddressRange(char* addressStr);
#endif /* PARSING_H_ */