53 #ifndef __APPS_INCLUDE_HEX2BIN_H 54 #define __APPS_INCLUDE_HEX2BIN_H 60 #include <tinyara/config.h> 64 #ifdef CONFIG_SYSTEM_HEX2BIN 71 #ifndef CONFIG_SYSTEM_HEX2BIN_BASEADDR 72 #define CONFIG_SYSTEM_HEX2BIN_BASEADDR 0x00000000 75 #ifndef CONFIG_SYSTEM_HEX2BIN_ENDPADDR 76 #define CONFIG_SYSTEM_HEX2BIN_ENDPADDR 0x00000000 79 #ifndef CONFIG_SYSTEM_HEX2BIN_SWAP 80 #define CONFIG_SYSTEM_HEX2BIN_SWAP 0 88 #if defined(CONFIG_EOL_IS_CR) 89 #undef CONFIG_EOL_IS_LF 90 #undef CONFIG_EOL_IS_BOTH_CRLF 91 #undef CONFIG_EOL_IS_EITHER_CRLF 92 #elif defined(CONFIG_EOL_IS_LF) 93 #undef CONFIG_EOL_IS_CR 94 #undef CONFIG_EOL_IS_BOTH_CRLF 95 #undef CONFIG_EOL_IS_EITHER_CRLF 96 #elif defined(CONFIG_EOL_IS_BOTH_CRLF) 97 #undef CONFIG_EOL_IS_CR 98 #undef CONFIG_EOL_IS_LF 99 #undef CONFIG_EOL_IS_EITHER_CRLF 100 #elif defined(CONFIG_EOL_IS_EITHER_CRLF) 101 #undef CONFIG_EOL_IS_CR 102 #undef CONFIG_EOL_IS_LF 103 #undef CONFIG_EOL_IS_BOTH_CRLF 105 #undef CONFIG_EOL_IS_CR 106 #undef CONFIG_EOL_IS_LF 107 #undef CONFIG_EOL_IS_BOTH_CRLF 108 #define CONFIG_EOL_IS_EITHER_CRLF 1 113 #ifdef CONFIG_CPP_HAVE_VARARGS 114 #ifdef CONFIG_SYSTEM_HEX2BIN_DEBUG 115 #define hex2bin_debug(format, ...) fprintf(stderr, format, ##__VA_ARGS__) 117 #define hex2bin_debug(...) 120 #ifdef CONFIG_SYSTEM_HEX2BIN_DEBUG 121 #define hex2bin_debug printf 123 #define hex2bin_debug (void) 134 enum hex2bin_swap_e {
146 #define EXTERN extern "C" 149 #define EXTERN extern 189 int hex2bin(FAR
struct lib_instream_s *instream, FAR
struct lib_sostream_s *outstream, uint32_t baseaddr, uint32_t endpaddr,
enum hex2bin_swap_e swap);
215 int hex2mem(
int fd, uint32_t baseaddr, uint32_t endpaddr,
enum hex2bin_swap_e swap);
241 int fhex2mem(FAR
FILE * instream, uint32_t baseaddr, uint32_t endpaddr,
enum hex2bin_swap_e swap);
257 #ifdef CONFIG_SYSTEM_HEX2BIN_BUILTIN 258 int hex2bin_main(
int argc,
char **argv);
275 #ifdef CONFIG_SYSTEM_HEX2MEM_BUILTIN 276 int hex2mem_main(
int argc,
char **argv);
Structure for getting character from the instream.
Structure for putting character to the outstream with seek operation support.