hci_dump.c (2fca4dad957cd7b88f4657ed51e89c12615dda72) hci_dump.c (2d17d4c0682d450ab238973b9cc335f0518b6547)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 87 unchanged lines hidden (view full) ---

96 (*hci_dump_implementation->log_packet)(packet_type, in, packet, len);
97}
98
99void hci_dump_log(int log_level, const char * format, ...){
100 if (!hci_dump_log_level_active(log_level)) return;
101
102 va_list argptr;
103 va_start(argptr, format);
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 87 unchanged lines hidden (view full) ---

96 (*hci_dump_implementation->log_packet)(packet_type, in, packet, len);
97}
98
99void hci_dump_log(int log_level, const char * format, ...){
100 if (!hci_dump_log_level_active(log_level)) return;
101
102 va_list argptr;
103 va_start(argptr, format);
104 (*hci_dump_implementation->log_message)(format, argptr);
104 (*hci_dump_implementation->log_message)(log_level, format, argptr);
105 va_end(argptr);
106}
107
108#ifdef __AVR__
109void hci_dump_log_P(int log_level, PGM_P format, ...){
110 if (!hci_dump_log_level_active(log_level)) return;
111
112 va_list argptr;
113 va_start(argptr, format);
105 va_end(argptr);
106}
107
108#ifdef __AVR__
109void hci_dump_log_P(int log_level, PGM_P format, ...){
110 if (!hci_dump_log_level_active(log_level)) return;
111
112 va_list argptr;
113 va_start(argptr, format);
114 (*hci_dump_implementation->log_message_P)(format, argptr);
114 (*hci_dump_implementation->log_message_P)(log_level, format, argptr);
115 va_end(argptr);
116}
117#endif
118
119void hci_dump_enable_log_level(int log_level, int enable){
120 if (log_level < HCI_DUMP_LOG_LEVEL_DEBUG) return;
121 if (log_level > HCI_DUMP_LOG_LEVEL_ERROR) return;
122 log_level_enabled[log_level] = enable != 0;

--- 58 unchanged lines hidden ---
115 va_end(argptr);
116}
117#endif
118
119void hci_dump_enable_log_level(int log_level, int enable){
120 if (log_level < HCI_DUMP_LOG_LEVEL_DEBUG) return;
121 if (log_level > HCI_DUMP_LOG_LEVEL_ERROR) return;
122 log_level_enabled[log_level] = enable != 0;

--- 58 unchanged lines hidden ---