kopia lustrzana https://github.com/stlink-org/stlink
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
rodzic
e5ff479d48
commit
4ce20d07e0
4601
src/common.c
4601
src/common.c
Plik diff jest za duży
Load Diff
|
@ -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"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stlink.h>
|
||||
#include "common_flash.h"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stlink.h>
|
||||
#include "common_flash.h"
|
||||
#include "map_file.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stlink.h>
|
||||
|
||||
// Endianness
|
||||
|
|
Ładowanie…
Reference in New Issue