util/ecst.h: Format with clang-format
BRANCH=none
TEST=none
#include <stdio.h>
#include <curses.h>
-
/*---------------------------------------------------------------------------
Defines
--------------------------------------------------------------------------*/
#define HDR_FW_HEADER_SIG_OFFSET 56
#define HDR_FW_IMAGE_SIG_OFFSET 60
-
#define FIRMW_CKSM_OFFSET 0x3C
/* Header field known values */
#define TMP_STR_SIZE 21
#define PAD_VALUE 0x00
-
#define MAX_ARGS 100
/* Text Colors */
@@ -216,17 +213,9 @@ struct tbinparams {
unsigned int bin_params;
} bin_params_struct;
-enum verbose_level {
- NO_VERBOSE = 0,
- REGULAR_VERBOSE,
- SUPER_VERBOSE
-};
+enum verbose_level { NO_VERBOSE = 0, REGULAR_VERBOSE, SUPER_VERBOSE };
-enum calc_type {
- CALC_TYPE_NONE = 0,
- CALC_TYPE_CHECKSUM ,
- CALC_TYPE_CRC
-};
+enum calc_type { CALC_TYPE_NONE = 0, CALC_TYPE_CHECKSUM, CALC_TYPE_CRC };
struct chip_info {
unsigned int ram_addr;
@@ -254,11 +243,9 @@ void init_calculation(unsigned int *check_sum_crc);
void finalize_calculation(unsigned int *check_sum_crc);
void update_calculation_information(unsigned char crc_con_dat);
-
/* Checksum calculation etc. (BIN Specific) */
int calc_header_crc_bin(unsigned int *pointer_header_checksum);
-int calc_firmware_csum_bin(unsigned int *p_cksum,
- unsigned int fw_offset,
+int calc_firmware_csum_bin(unsigned int *p_cksum, unsigned int fw_offset,
unsigned int fw_length);
/* Checksum calculation etc. (ERP Specific) */
@@ -267,22 +254,16 @@ int calc_erp_csum_bin(unsigned short *region_pointer_header_checksum,
/* No words - General */
void exit_with_usage(void);
-int copy_file_to_file(char *dst_file_name,
- char *src_file_name,
- int offset,
+int copy_file_to_file(char *dst_file_name, char *src_file_name, int offset,
int origin);
-int write_to_file(unsigned int write_value,
- unsigned int offset,
- unsigned char num_of_bytes,
- char *print_string);
-int read_from_file(unsigned int offset,
- unsigned char size_to_read,
- unsigned int *read_value,
- char *print_string);
+int write_to_file(unsigned int write_value, unsigned int offset,
+ unsigned char num_of_bytes, char *print_string);
+int read_from_file(unsigned int offset, unsigned char size_to_read,
+ unsigned int *read_value, char *print_string);
/* Nice Particular Printf - General */
-__attribute__((__format__(__printf__, 2, 3)))
-void my_printf(int error_level, char *fmt, ...);
+__attribute__((__format__(__printf__, 2, 3))) void my_printf(int error_level,
+ char *fmt, ...);
int str_cmp_no_case(const char *s1, const char *s2);
int get_file_length(FILE *stream);
