From aaa1682ba28bbe779e8e859f8529b64c4cd5f80d Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 3 Feb 2022 22:40:57 +0100 Subject: [PATCH] chipset: prefix fw vars with da145xx_ --- chipset/da145xx/convert_hex_files.py | 14 ++++++++------ chipset/da145xx/hci_581_active_uart.c | 6 +++--- chipset/da145xx/hci_581_active_uart.h | 6 +++--- chipset/da145xx/hci_585.c | 10 +++++----- chipset/da145xx/hci_585.h | 12 ++++++------ port/posix-h4-da14581/main.c | 2 +- port/posix-h4-da14585/main.c | 2 +- port/windows-h4-da14585/main.c | 2 +- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/chipset/da145xx/convert_hex_files.py b/chipset/da145xx/convert_hex_files.py index f036198fc..05f063cb2 100755 --- a/chipset/da145xx/convert_hex_files.py +++ b/chipset/da145xx/convert_hex_files.py @@ -24,9 +24,9 @@ header = ''' #include -extern const uint8_t da14581_fw_data[]; -extern const uint32_t da14581_fw_size; -extern const char * da14581_fw_name; +extern const uint8_t da145xx_fw_data[]; +extern const uint32_t da145xx_fw_size; +extern const char * da145xx_fw_name; #endif ''' @@ -36,16 +36,18 @@ code_start = ''' * BASENAME.c converted from BASENAME.hex */ +#define BTSTACK_FILE__ "BASENAME.c" + #include "BASENAME.h" -const char * da14581_fw_name = "BASENAME"; +const char * da145xx_fw_name = "BASENAME"; -const uint8_t da14581_fw_data[] = { +const uint8_t da145xx_fw_data[] = { ''' code_end = ''' }; -const uint32_t da14581_fw_size = sizeof(da14581_fw_data); +const uint32_t da145xx_fw_size = sizeof(da145xx_fw_data); ''' def convert_hex(basename): diff --git a/chipset/da145xx/hci_581_active_uart.c b/chipset/da145xx/hci_581_active_uart.c index 26b0a3354..c91bf23d7 100644 --- a/chipset/da145xx/hci_581_active_uart.c +++ b/chipset/da145xx/hci_581_active_uart.c @@ -7,9 +7,9 @@ #include "hci_581_active_uart.h" -const char * da14581_fw_name = "hci_581_active_uart"; +const char * da145xx_fw_name = "hci_581_active_uart"; -const uint8_t da14581_fw_data[] = { +const uint8_t da145xx_fw_data[] = { 0x00, 0x98, 0x00, 0x20, 0xcd, 0x04, 0x00, 0x20, 0xd5, 0x04, 0x00, 0x20, 0xed, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x00, 0x20, @@ -975,4 +975,4 @@ const uint8_t da14581_fw_data[] = { 0xb0, 0x00, 0x00, 0x00, 0x14, 0x38, 0x00, 0x20, 0x08, 0x09, 0x08, 0x00, 0x48, 0x1e, 0x08, 0x00, 0xb8, 0x11, 0x00, 0x00, 0x14, 0x38, 0x00, 0x20, }; -const uint32_t da14581_fw_size = sizeof(da14581_fw_data); +const uint32_t da145xx_fw_size = sizeof(da145xx_fw_data); diff --git a/chipset/da145xx/hci_581_active_uart.h b/chipset/da145xx/hci_581_active_uart.h index 23c490e8b..37e6d9596 100644 --- a/chipset/da145xx/hci_581_active_uart.h +++ b/chipset/da145xx/hci_581_active_uart.h @@ -8,8 +8,8 @@ #include -extern const uint8_t da14581_fw_data[]; -extern const uint32_t da14581_fw_size; -extern const char * da14581_fw_name; +extern const uint8_t da145xx_fw_data[]; +extern const uint32_t da145xx_fw_size; +extern const char * da145xx_fw_name; #endif diff --git a/chipset/da145xx/hci_585.c b/chipset/da145xx/hci_585.c index 4cf56230b..89b96c93a 100644 --- a/chipset/da145xx/hci_585.c +++ b/chipset/da145xx/hci_585.c @@ -7,11 +7,11 @@ #include "hci_585.h" -const char * da14581_fw_name = "hci_585"; +const char * da145xx_fw_name = "hci_585"; -const uint8_t da14581_fw_data[] = { - 0xd8, 0x3a, 0xfc, 0x07, 0x69, 0x05, 0xfc, 0x07, 0x71, 0x05, 0xfc, 0x07, 0x89, 0x05, 0xfc, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +const uint8_t da145xx_fw_data[] = { + 0xd8, 0x3a, 0xfc, 0x07, 0x69, 0x05, 0xfc, 0x07, 0x71, 0x05, 0xfc, 0x07, 0x89, 0x05, 0xfc, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x05, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x05, 0xfc, 0x07, 0xa5, 0x05, 0xfc, 0x07, 0x05, 0x19, 0xfc, 0x07, 0x67, 0x19, 0xfc, 0x07, 0x1d, 0x27, 0xf0, 0x07, 0x9f, 0x15, 0xfc, 0x07, @@ -857,4 +857,4 @@ const uint8_t da14581_fw_data[] = { 0x8c, 0x0f, 0xfd, 0x07, 0x44, 0x32, 0x00, 0x00, 0x74, 0x2f, 0xfc, 0x07, 0x80, 0x0c, 0x00, 0x00, }; -const uint32_t da14581_fw_size = sizeof(da14581_fw_data); +const uint32_t da145xx_fw_size = sizeof(da145xx_fw_data); diff --git a/chipset/da145xx/hci_585.h b/chipset/da145xx/hci_585.h index 862d41322..acfc1d889 100644 --- a/chipset/da145xx/hci_585.h +++ b/chipset/da145xx/hci_585.h @@ -1,15 +1,15 @@ /** - * hci_585.h converted from hci_585.hex + * hci_585.h converted from hci_585.hex */ -#ifndef HCI_585_UART_H -#define HCI_585_UART_H +#ifndef hci_585_H +#define hci_585_H #include -extern const uint8_t da14581_fw_data[]; -extern const uint32_t da14581_fw_size; -extern const char * da14581_fw_name; +extern const uint8_t da145xx_fw_data[]; +extern const uint32_t da145xx_fw_size; +extern const char * da145xx_fw_name; #endif diff --git a/port/posix-h4-da14581/main.c b/port/posix-h4-da14581/main.c index e827080a9..46b9355c9 100644 --- a/port/posix-h4-da14581/main.c +++ b/port/posix-h4-da14581/main.c @@ -193,7 +193,7 @@ int main(int argc, const char * argv[]){ printf("Phase 1: Download firmware\n"); // phase #2 start main app - btstack_chipset_da145xx_download_firmware_with_uart(uart_driver, da14581_fw_data, da14581_fw_size, &phase2); + btstack_chipset_da145xx_download_firmware_with_uart(uart_driver, da145xx_fw_data, da145xx_fw_size, &phase2); // go btstack_run_loop_execute(); diff --git a/port/posix-h4-da14585/main.c b/port/posix-h4-da14585/main.c index 3973ca051..a6800f6ba 100644 --- a/port/posix-h4-da14585/main.c +++ b/port/posix-h4-da14585/main.c @@ -195,7 +195,7 @@ int main(int argc, const char * argv[]){ printf("Phase 1: Download firmware\n"); // phase #2 start main app - btstack_chipset_da145xx_download_firmware_with_uart(uart_driver, da14581_fw_data, da14581_fw_size, &phase2); + btstack_chipset_da145xx_download_firmware_with_uart(uart_driver, da145xx_fw_data, da145xx_fw_size, &phase2); // go btstack_run_loop_execute(); diff --git a/port/windows-h4-da14585/main.c b/port/windows-h4-da14585/main.c index 103774005..1feb8c245 100644 --- a/port/windows-h4-da14585/main.c +++ b/port/windows-h4-da14585/main.c @@ -199,7 +199,7 @@ int main(int argc, const char * argv[]){ printf("Phase 1: Download firmware\n"); // phase #2 start main app - btstack_chipset_da145xx_download_firmware(uart_driver, da14581_fw_data, da14581_fw_size, &phase2); + btstack_chipset_da145xx_download_firmware(uart_driver, da145xx_fw_data, da145xx_fw_size, &phase2); // go btstack_run_loop_execute();