File tree 4 files changed +15
-18
lines changed
4 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 33
33
#
34
34
# ###########################################################################
35
35
36
- - include $(TOPDIR ) /Make.defs
36
+ include $(APPDIR ) /Make.defs
37
37
38
38
# Btstack_Demo, World! built-in application info
39
39
40
- CONFIG_EXAMPLES_BTSTACK_PRIORITY ?= SCHED_PRIORITY_DEFAULT
40
+ CONFIG_EXAMPLES_BTSTACK_PRIORITY ?= SCHED_PRIORITY_DEFAULT
41
41
CONFIG_EXAMPLES_BTSTACK_STACKSIZE ?= 2048
42
42
43
- APPNAME = btapp
43
+ PROGNAME = panu_demo
44
44
PRIORITY = $(CONFIG_EXAMPLES_BTSTACK_PRIORITY )
45
45
STACKSIZE = $(CONFIG_EXAMPLES_BTSTACK_STACKSIZE )
46
+ MODULE = $(CONFIG_EXAMPLES_BTSTACK )
46
47
47
48
#
48
49
@@ -59,6 +60,7 @@ CFLAGS += -I${BTSTACK_ROOT}/platform/posix
59
60
CFLAGS += -I${BTSTACK_ROOT}/platform/embedded
60
61
CFLAGS += -I..
61
62
CFLAGS += -DNUTTX -DCSR_ONLY -DCSR8811_PSKEYS
63
+ CFLAGS += -Wno-format -Wno-undef -Wno-unused-function
62
64
63
65
ASRCS =
64
66
@@ -88,7 +90,4 @@ CSRCS += ./example/panu_demo.c
88
90
89
91
MAINSRC = port/posix-h4/main.c
90
92
91
- CONFIG_EXAMPLES_BTSTACK_PROGNAME ?= btapp$(EXEEXT )
92
- PROGNAME = $(CONFIG_EXAMPLES_BTSTACK_PROGNAME )
93
-
94
93
include $(APPDIR ) /Application.mk
Original file line number Diff line number Diff line change 62
62
#include "btstack_util.h"
63
63
#include "hci_transport.h"
64
64
65
- #ifdef OK
66
- #undef OK
67
- #endif
68
-
65
+ #if 0
69
66
enum update_result {
70
67
OK ,
71
68
SKIP ,
72
69
};
70
+ #else
71
+ #define SKIP 1
72
+ #endif
73
73
74
74
// minimal CSR init script to configure PSKEYs and activate them. It uses store 0x0008 = psram.
75
75
static const uint8_t init_script [] = {
@@ -183,7 +183,7 @@ static void chipset_init(const void * config){
183
183
184
184
// set requested baud rate
185
185
// @return 0 = OK, 1 = SKIP, 2 = ..
186
- static enum update_result update_init_script_command (uint8_t * hci_cmd_buffer ){
186
+ static int update_init_script_command (uint8_t * hci_cmd_buffer ){
187
187
uint16_t varid = little_endian_read_16 (hci_cmd_buffer , 10 );
188
188
if (varid != 0x7003 ) return OK ;
189
189
uint16_t key = little_endian_read_16 (hci_cmd_buffer , 14 );
@@ -232,7 +232,7 @@ static btstack_chipset_result_t chipset_next_command(uint8_t * hci_cmd_buffer){
232
232
memcpy (& hci_cmd_buffer [3 ], (uint8_t * ) & init_script [init_script_offset ], payload_len );
233
233
234
234
// support for on-the-fly configuration updates
235
- enum update_result res = update_init_script_command (hci_cmd_buffer );
235
+ int res = update_init_script_command (hci_cmd_buffer );
236
236
init_script_offset += payload_len ;
237
237
238
238
// support for skipping commands
Original file line number Diff line number Diff line change @@ -70,9 +70,8 @@ static uint32_t sdp_bnep_remote_uuid = 0;
70
70
static uint8_t attribute_value [1000 ];
71
71
static const unsigned int attribute_value_buffer_size = sizeof (attribute_value );
72
72
73
- // MBP 2016
74
- static const char * remote_addr_string = "F4-0F-24-3B-1B-E1" ;
75
- // Wiko Sunny static const char * remote_addr_string = "A0:4C:5B:0F:B2:42";
73
+ // Android Phone
74
+ static const char * remote_addr_string = "9C-5C-F9-0C-5C-15" ;
76
75
77
76
static bd_addr_t remote_addr ;
78
77
Original file line number Diff line number Diff line change @@ -97,8 +97,7 @@ static int csr_off(void){
97
97
return 0 ;
98
98
}
99
99
100
- static int csr_init (void ){
101
- return 0 ;
100
+ static void csr_init (const void * arg ){
102
101
}
103
102
104
103
static btstack_control_t hw_control = {
@@ -243,7 +242,7 @@ static void local_version_information_handler(uint8_t * packet){
243
242
}
244
243
245
244
#ifdef NUTTX
246
- int btapp_main (int argc , const char * argv []){
245
+ int panu_demo_main (int argc , const char * argv []){
247
246
#else
248
247
int main (int argc , const char * argv []){
249
248
#endif
You can’t perform that action at this time.
0 commit comments