C API for BALTECH SDK
ftob.h
Go to the documentation of this file.
1 
11 #ifndef __BRP_BALTECH_API_CMDS_FTOB_H__
12 #define __BRP_BALTECH_API_CMDS_FTOB_H__
13 #include "../typedefs.h"
18 #define BRP_Ftob_ErrInvalidFilename BRP_ERR_STATUS(0x0300, 0x01)
19 
23 #define BRP_Ftob_ErrFileAccessDenied BRP_ERR_STATUS(0x0300, 0x02)
24 
28 #define BRP_Ftob_ErrWriteBlock BRP_ERR_STATUS(0x0300, 0x03)
29 
33 #define BRP_Ftob_ErrReadBlock BRP_ERR_STATUS(0x0300, 0x04)
34 
38 #define BRP_Ftob_ErrNoFileActive BRP_ERR_STATUS(0x0300, 0x05)
39 
43 #define BRP_Ftob_ErrOutOfMemory BRP_ERR_STATUS(0x0300, 0x06)
44 
48 #define BRP_Ftob_ErrBroken BRP_ERR_STATUS(0x0300, 0x07)
49 
59 brp_errcode brp_Ftob_OpenReadFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len);
71 brp_errcode brp_Ftob_OpenWriteFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len, unsigned* MaxBlockLen);
83 brp_errcode brp_Ftob_ReadFileBlock(brp_protocol protocol, bool ToggleBit, unsigned MaxBlockLength, brp_buf* BlockData, size_t* BlockData_len, brp_mempool *mempool);
93 brp_errcode brp_Ftob_WriteFileBlock(brp_protocol protocol, bool ToggleBit, brp_buf BlockData, size_t BlockData_len);
101 brp_errcode brp_Ftob_CloseFile(brp_protocol protocol, bool Success);
102 #endif
103 
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:27
brp_errcode brp_Ftob_OpenWriteFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len, unsigned *MaxBlockLen)
brp_errcode brp_Ftob_ReadFileBlock(brp_protocol protocol, bool ToggleBit, unsigned MaxBlockLength, brp_buf *BlockData, size_t *BlockData_len, brp_mempool *mempool)
brp_errcode brp_Ftob_WriteFileBlock(brp_protocol protocol, bool ToggleBit, brp_buf BlockData, size_t BlockData_len)
brp_errcode brp_Ftob_CloseFile(brp_protocol protocol, bool Success)
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
brp_errcode brp_Ftob_OpenReadFile(brp_protocol protocol, brp_buf Filename, size_t Filename_len)