BALTECH SDK wrapper functions reference
reader_updater.h
Go to the documentation of this file.
1 #ifndef __BRP_READER_UPDATER_H__
2 #define __BRP_READER_UPDATER_H__
3 
4 #include <brp_lib.h>
5 
6 #if defined(__cplusplus)
7 extern "C" {
8 #endif
9 
10 
20 typedef void (*brp_update_progress_cb)(
21  unsigned transferred_bytes,
22  unsigned estimated_total,
23  unsigned progress_percent,
24  unsigned estimated_time_overhead,
25  bool reconnecting
26 );
27 
28 
45  const char * hex_str,
46  size_t hex_len,
47  brp_buf * blob,
48  size_t * blob_size,
49  brp_mempool * mempool
50 );
51 
52 
68  brp_protocol dev,
69  brp_buf blob,
70  size_t blob_size,
71  brp_update_progress_cb progress_cb
72 );
73 
74 
88  brp_protocol dev,
89  const char * filepath,
90  brp_update_progress_cb progress_cb
91 );
92 
93 
94 #if defined(__cplusplus)
95 }
96 #endif
97 
98 #endif
brp_errcode brp_update_reader_from_blob(brp_protocol dev, brp_buf blob, size_t blob_size, brp_update_progress_cb progress_cb)
Upload binary blob to reader with optional progress notification.
void(* brp_update_progress_cb)(unsigned transferred_bytes, unsigned estimated_total, unsigned progress_percent, unsigned estimated_time_overhead, bool reconnecting)
Progress notification callback for reader update operations.
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
brp_errcode brp_update_reader(brp_protocol dev, const char *filepath, brp_update_progress_cb progress_cb)
Convenience: load hex file and upload to reader.
brp_errcode brp_get_update_blob_from_string(const char *hex_str, size_t hex_len, brp_buf *blob, size_t *blob_size, brp_mempool *mempool)
Parse BEC2/BF3 hex string to binary blob.
A single include header file, that includes all header files necessary for the BRP library...
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61