mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-20 18:40:31 +00:00
em9304: emp converter add config for 8 connections and enables DLE
This commit is contained in:
parent
7e4bff8292
commit
881a49d59a
@ -3,7 +3,8 @@
|
||||
import sys
|
||||
|
||||
usage = '''This script converts a set of configurations and patches in .emp format for EM9304
|
||||
into C files to be used with BTstack.
|
||||
into a single C files to be used with BTstack. It also configures the controller for 8 connections
|
||||
and enables support for LE Data Length Extension.
|
||||
|
||||
Usage:
|
||||
$ ./convert_emp.py container.emp
|
||||
@ -27,6 +28,8 @@ extern const char * container_blob_name;
|
||||
code_start = '''/**
|
||||
* BASENAME.c converted from BASENAME.bin
|
||||
* Size: SIZE bytes
|
||||
*
|
||||
* BTstack: added config for 8 connections + 251 packet len
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
@ -37,6 +40,11 @@ const uint8_t container_blob_data[] = {
|
||||
'''
|
||||
|
||||
code_end = '''
|
||||
// configure EM9304 for 8 connections, data length 251
|
||||
0x33, 0x39, 0x6d, 0x65, 0x24, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x14,
|
||||
0x11, 0x0c, 0x00, 0x00, 0x56, 0x62, 0xc3, 0xd4, 0x30, 0x02, 0x00, 0x00,
|
||||
0xfb, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0x5a, 0x00, 0x0c, 0xf3
|
||||
|
||||
};
|
||||
const uint32_t container_blob_size = sizeof(container_blob_data);
|
||||
'''
|
||||
@ -51,8 +59,6 @@ def convert_emp(basename):
|
||||
|
||||
# reduce size by 4 as it ends with four zero bytes that indicate the end of the file
|
||||
size -= 4
|
||||
print ('Size %u' % size)
|
||||
|
||||
|
||||
# don't write .h file as we would need to store its name in btstack_chipset_em9301.c, too
|
||||
# with open(basename + '.h', 'w') as fout:
|
||||
|
Loading…
x
Reference in New Issue
Block a user