9 #ifndef __BRP_PROTOCOL_H__ 10 #define __BRP_PROTOCOL_H__ 27 #define BRP_MODE_STD 0x00 28 #define BRP_MODE_NONE BRP_MODE_STD 40 #define BRP_MODE_CONTINUOUS 0x01 50 #define BRP_MODE_REPEAT 0x02 56 #define BRP_MODE_BREAK 0x03 unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
unsigned long brp_time
absolute/relative timeout/delay in ms.
BRP_LIB brp_errcode brp_break_cmd(brp_protocol protocol)
Stops a command that was run with brp_send_cmd() with the mode parameter set to in BRP_MODE_CONTINUOU...
This file primarly defines the common part of all protocol's data structures (:brp_protocol_t) and AP...
BRP_LIB brp_errcode brp_send_cmd(brp_protocol protocol, int cmd_code, brp_buf param_buf, size_t param_len, brp_time cmd_timeout, int mode)
Sends a command frame via a BRP protocol.
BRP_LIB brp_errcode brp_recv_cmd(brp_protocol protocol, brp_buf resp_buf, size_t max_resp_len, size_t *resp_len, brp_time timeout)
Returns the response of a command runned on the BRP device connected via base_protocol.
BRP_LIB brp_protocol brp_create_brp(void)
Creates a new BRP protocol.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
BRP_LIB brp_errcode brp_exec_cmd(brp_protocol protocol, int cmd_code, brp_buf param_buf, size_t param_len, brp_buf resp_buf, size_t max_resp_len, size_t *resp_len, brp_time cmd_timeout)
Runs a command on the BRP device connected via the assigned protocol.