31 lines
663 B
C
31 lines
663 B
C
|
#include <stdio.h>
|
||
|
#include <stdarg.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#include "uart.h"
|
||
|
#include "iap.h"
|
||
|
#include "crc.h"
|
||
|
|
||
|
#define DELIMIERS ","
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
typedef struct cmd {
|
||
|
char** argv; // a first command splitted as arguments in the argv style
|
||
|
int argc; // number of arguments in the first command
|
||
|
} cmd_t;
|
||
|
|
||
|
|
||
|
void uart_commands_getid(error_code* status);
|
||
|
|
||
|
void uart_commands_getserial(error_code* status);
|
||
|
|
||
|
crc_t uart_commands_prog(void);
|
||
|
|
||
|
void uart_commands_data(error_code* status, int size, crc_t* checksum_global, crc_t checksum_loc, int offset);
|
||
|
|
||
|
int uart_parse_command(char *user_input, cmd_t *cmd);
|
||
|
|
||
|
uint32_t uart_string_to_int(const char* str);
|