Export to GitHub

btstack - issue #443

Patch for /trunk/src/rfcomm.c


Posted on Feb 12, 2015 by Grumpy Rhino

In a File,rfcomm.c, I didn't see the definition of bt_store_16 (uint8_t*,uint8_t,uint16_t) either in header files or in the source files. Without knowing the functionality, it's hard to send the patch (It requires implementation of bt_store_16(uint8_t*,uint8_t,uint16_t) either as Macro or API)

Attachments

Comment #1

Posted on Feb 12, 2015 by Swift Ox

bt_store_16 is defined in include/btstack/util.h and implemented in src/utils.c

Please tell me what you want to do with BTstack and what's the goal of these patches at matthias.ringwald@gmail.com - I'm a bit confused :)

Comment #2

Posted on Feb 13, 2015 by Grumpy Rhino

Now, Status looks likes a Bug, I gone through the Implementation of code in src/utils.c void bt_store_16(uint8_t *buffer, uint16_t pos, uint16_t value){ buffer[pos++] = value; buffer[pos++] = value >> 8; } As per my understanding,The below mentioned API's will give the compilation error from the file trunk/src/rfcomm.c

static void rfcomm_emit_channel_opened(rfcomm_channel_t *channel, uint8_t status); static void rfcomm_emit_channel_open_failed_outgoing_memory(void * connection, bd_addr_t *addr, uint8_t server_channel);

Above mentioned API's yields the error due to the uint8_t variable inside the API definition.

here there are two possibilities, one possibility is to modify the variable with in the API (we should comprise for the optimization),and other is to modify the function definition of (bt_store_16) in src/util.c to support the below mentioned signature of bt_store_16 (uint8_t*,uint8_t,uint16_t).

Can you please confirm the same.

I modify the API's, to support the API definition in src/util.c using the Compiler Flag #BTSTACK_LE

Status: Invalid

Labels:
Type-Patch