stlink-org#1216 refactoring of common.c

File divided to some parts. Functions with "flash" in names extracted to common_flash.c, with "option" extracted to option.c etc.
Removed unnecessary headers.
Removed one single function which was used nowhere.
And so on.
Project built under Windows and seems to be working.
pull/1218/head
hydroconstructor 2022-01-20 13:46:42 +04:00
rodzic e5ff479d48
commit 4ce20d07e0
6 zmienionych plików z 540 dodań i 4072 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,6 +1,7 @@
#include <stdio.h>
#include <stlink.h>
#include <unistd.h>
#include <string.h>
#include "calculate.h"
#include "common_flash.h"
#include "map_file.h"

Wyświetl plik

@ -1,4 +1,5 @@
#include <stdio.h>
#include <string.h>
#include <stlink.h>
#include "common_flash.h"

Wyświetl plik

@ -1,10 +1,17 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <md5.h>
#include <unistd.h> // for close
#include <stlink.h>
#include <logging.h>
#include "map_file.h"
#ifndef O_BINARY
#define O_BINARY 0
#endif
#ifndef MAX_FILE_SIZE
#define MAX_FILE_SIZE (1<<20) // 1 GB max file size
#endif

Wyświetl plik

@ -1,4 +1,5 @@
#include <stdio.h>
#include <string.h>
#include <stlink.h>
#include "common_flash.h"
#include "map_file.h"

Wyświetl plik

@ -1,4 +1,5 @@
#include <stdio.h>
#include <string.h>
#include <stlink.h>
// Endianness