Skip to content

Commit

Permalink
[Telink] Update set ble mac address for w91 and b9x
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiiSalamakha committed Jun 19, 2024
1 parent 995d8a0 commit f01eeda
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
platform: telink
- name: Update Zephyr to specific revision (for developers purpose)
shell: bash
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 5ae5db00ac820fcbbcda9d7e71f0133240aa2c87"
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8"
- name: CI Examples Telink
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
gh-context: ${{ toJson(github) }}

- name: Update Zephyr to specific revision (for developers purpose)
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 5ae5db00ac820fcbbcda9d7e71f0133240aa2c87"
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8"

- name: Build example Telink (B92 retention) Air Quality Sensor App
run: |
Expand Down
6 changes: 4 additions & 2 deletions config/telink/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ config BT_BUF_ACL_TX_SIZE
default 251

config BT_RX_STACK_SIZE
default 810
default 810 if BT_B9X
default 2048 if BT_W91

config BT_HCI_TX_STACK_SIZE
default 640
default 640 if BT_B9X
default 2048 if BT_W91

config BT_DEVICE_NAME_GATT_WRITABLE
bool
Expand Down
10 changes: 2 additions & 8 deletions src/platform/telink/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@
#include <zephyr/sys/byteorder.h>
#include <zephyr/sys/util.h>

// TODO: need common mac_init solution for B9X & W91
#ifndef CONFIG_BOARD_TLSR9118BDK40D
extern "C" {
#include <b9x_bt_flash.h>
extern __attribute__((noinline)) void telink_bt_blc_mac_init(uint8_t *bt_mac);
}
#endif

#if defined(CONFIG_PM) && !defined(CONFIG_CHIP_ENABLE_PM_DURING_BLE)
#include <zephyr/pm/policy.h>
Expand Down Expand Up @@ -120,10 +117,7 @@ CHIP_ERROR InitBLEMACAddress()
int error = 0;
bt_addr_le_t addr;

// TODO: need common mac_init solution for B9X & W91
#ifndef CONFIG_BOARD_TLSR9118BDK40D
b9x_bt_blc_mac_init(addr.a.val);
#endif
telink_bt_blc_mac_init(addr.a.val);

if (BT_ADDR_IS_STATIC(&addr.a)) // in case of Random static address, create a new id
{
Expand Down
3 changes: 2 additions & 1 deletion src/platform/telink/tlsr9118bdk40d_3m_flash.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/delete-node/ partition@88000;
/delete-node/ partition@f0000;
/delete-node/ partition@f4000;
/delete-node/ partition@fe000;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x20000>;
Expand All @@ -27,7 +28,7 @@
label = "image-1";
reg = <0x118000 0xe8000>;
};
reserved_partition: partition@200000 {
vendor_partition: partition@200000 {
label = "vendor-data";
reg = <0x200000 0x100000>;
};
Expand Down

0 comments on commit f01eeda

Please sign in to comment.