mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 00:39:51 +00:00
disable packet logger, log_info, log_debug for Arduino, add methods to enable from Sketch
This commit is contained in:
parent
8a37b10a01
commit
3370eb0ffc
@ -712,12 +712,13 @@ void BTstackManager::setup(void){
|
|||||||
btstack_memory_init();
|
btstack_memory_init();
|
||||||
run_loop_init(RUN_LOOP_EMBEDDED);
|
run_loop_init(RUN_LOOP_EMBEDDED);
|
||||||
|
|
||||||
hci_dump_open(NULL, HCI_DUMP_STDOUT);
|
|
||||||
|
|
||||||
hci_transport_t * transport = hci_transport_h4_dma_instance();
|
hci_transport_t * transport = hci_transport_h4_dma_instance();
|
||||||
bt_control_t * control = bt_control_em9301_instance();
|
bt_control_t * control = bt_control_em9301_instance();
|
||||||
hci_init(transport, NULL, control, NULL);
|
hci_init(transport, NULL, control, NULL);
|
||||||
|
|
||||||
|
// disable LOG_INFO messages
|
||||||
|
hci_dump_enable_log_level(LOG_LEVEL_INFO, 0);
|
||||||
|
|
||||||
if (have_custom_addr){
|
if (have_custom_addr){
|
||||||
hci_set_bd_addr(public_bd_addr);
|
hci_set_bd_addr(public_bd_addr);
|
||||||
}
|
}
|
||||||
@ -748,6 +749,15 @@ void BTstackManager::setup(void){
|
|||||||
printf("--> READY <--\n");
|
printf("--> READY <--\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BTstackManager::enablePacketLogger(void){
|
||||||
|
hci_dump_open(NULL, HCI_DUMP_STDOUT);
|
||||||
|
}
|
||||||
|
void BTstackManager::enableDebugLogger(){
|
||||||
|
// enable LOG_INFO messages
|
||||||
|
hci_dump_enable_log_level(LOG_LEVEL_INFO, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void BTstackManager::loop(void){
|
void BTstackManager::loop(void){
|
||||||
// process data from/to Bluetooth module
|
// process data from/to Bluetooth module
|
||||||
hal_uart_dma_process();
|
hal_uart_dma_process();
|
||||||
|
@ -128,6 +128,8 @@ public:
|
|||||||
void loop(void);
|
void loop(void);
|
||||||
|
|
||||||
void setPublicBdAddr(bd_addr_t addr);
|
void setPublicBdAddr(bd_addr_t addr);
|
||||||
|
void enablePacketLogger();
|
||||||
|
void enableDebugLogger();
|
||||||
|
|
||||||
void setAdvData(uint16_t size, const uint8_t * data);
|
void setAdvData(uint16_t size, const uint8_t * data);
|
||||||
void iBeaconConfigure(UUID * uuid, uint16_t major_id, uint16_t minor_id, uint8_t measured_power = 0xc6);
|
void iBeaconConfigure(UUID * uuid, uint16_t major_id, uint16_t minor_id, uint8_t measured_power = 0xc6);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user