[GitHub] ccollins476ad opened a new pull request #914: boot_serial - Allow UART string for serial mode.
ccollins476ad opened a new pull request #914: boot_serial - Allow UART string for serial mode. URL: https://github.com/apache/mynewt-core/pull/914 *Note: This feature was requested by a user. If we are unsure if this feature belongs in the boot loader in its current state, I am happy to just point him to this branch in the meantime. Also, maybe this should be filed against MCUboot instead?* If enabled, the serial boot loader listens on the UART for a string for a configurable amount of time. If the string is detected, the boot loader enters serial mode. If the string is not detected when the timeout expires, the boot loader proceeds in normal (non-serial) mode. This feature is intended for setups that lack a suitable pin to use for enabling serial mode (either the pins are inaccessible or inconvenient to use). Enabling this feature added 248 bytes to the boot loader binary when built on the nRF52dk with the default string setting ("nmgr"). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[mynewt-core] branch master updated (f415e00 -> 545acc5)
This is an automated email from the ASF dual-hosted git repository. mlaz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git. from f415e00 Merge pull request #836 from mlaz/pwm_interrupt add 2fe14d2 added int easing lib add f75e18a added float version add e3e823c changing cflags to lflags add cc059d7 Fixed int funcion names. new 545acc5 Merge pull request #822 from mlaz/easing The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: util/easing/include/easing/easing.h | 120 ++ {sys/sysinit => util/easing}/pkg.yml | 11 +- util/easing/src/easing.c | 693 +++ 3 files changed, 818 insertions(+), 6 deletions(-) create mode 100644 util/easing/include/easing/easing.h copy {sys/sysinit => util/easing}/pkg.yml (88%) create mode 100644 util/easing/src/easing.c -- To stop receiving notification emails like this one, please contact m...@apache.org.
[mynewt-core] 01/01: Merge pull request #822 from mlaz/easing
This is an automated email from the ASF dual-hosted git repository. mlaz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git commit 545acc5bd1dff3be451944e810f6855ece0af5d1 Merge: f415e00 cc059d7 Author: Miguel AzevedoAuthorDate: Tue Mar 13 16:04:32 2018 -0300 Merge pull request #822 from mlaz/easing Adding int/float easing library util/easing/include/easing/easing.h | 120 +++ util/easing/pkg.yml | 28 ++ util/easing/src/easing.c| 693 3 files changed, 841 insertions(+) -- To stop receiving notification emails like this one, please contact m...@apache.org.
[mynewt-core] 01/01: Merge pull request #836 from mlaz/pwm_interrupt
This is an automated email from the ASF dual-hosted git repository. mlaz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git commit f415e006c0351631325c5748f128198bd1dffa69 Merge: 00eb38b e045996 Author: Miguel AzevedoAuthorDate: Tue Mar 13 16:03:58 2018 -0300 Merge pull request #836 from mlaz/pwm_interrupt PWM add cycle interrupt handling to pwm_nrf52 driver apps/pwm_test/pkg.yml| 1 + apps/pwm_test/src/main.c | 152 -- hw/drivers/pwm/include/pwm/pwm.h | 42 +++- hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c | 343 +++ hw/drivers/pwm/src/pwm.c | 16 ++ 5 files changed, 448 insertions(+), 106 deletions(-) -- To stop receiving notification emails like this one, please contact m...@apache.org.
[GitHub] mlaz closed pull request #836: PWM add cycle interrupt handling to pwm_nrf52 driver
mlaz closed pull request #836: PWM add cycle interrupt handling to pwm_nrf52 driver URL: https://github.com/apache/mynewt-core/pull/836 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/apps/pwm_test/pkg.yml b/apps/pwm_test/pkg.yml index 83b4013b0..44d6f32ef 100644 --- a/apps/pwm_test/pkg.yml +++ b/apps/pwm_test/pkg.yml @@ -28,3 +28,4 @@ pkg.deps: - kernel/os - sys/console/full - hw/drivers/pwm +- util/easing diff --git a/apps/pwm_test/src/main.c b/apps/pwm_test/src/main.c index 34d5cf727..b57a437af 100755 --- a/apps/pwm_test/src/main.c +++ b/apps/pwm_test/src/main.c @@ -21,96 +21,128 @@ #include #include #include +#include +#include struct pwm_dev *pwm; -uint16_t max_val; -static struct os_callout my_callout; +static uint32_t pwm_freq = 1000; +static uint32_t max_steps = 500; /* two seconds motion up/down */ +static uint16_t top_val; +static volatile uint32_t step = 0; +static volatile bool up = false; +static volatile int func_num = 1; +static easing_int_func_t easing_funct = sine_int_io; + +static void +pwm_cycle_handler(void* unused) +{ +int16_t eased; +eased = easing_funct(step, max_steps, top_val); +pwm_enable_duty_cycle(pwm, 0, eased); +if (step >= max_steps || step <= 0) { +up = !up; +} + +step += (up) ? 1 : -1; +} + +static void +pwm_end_seq_handler(void* chan_conf) +{ +int rc; +step = 0; +up = false; + +switch (func_num) +{ +case 0: +easing_funct = sine_int_io; +console_printf ("Easing: sine io\n"); +break; +case 1: +easing_funct = bounce_int_io; +console_printf ("Easing: bounce io\n"); +break; +case 2: +easing_funct = circular_int_io; +console_printf ("Easing: circular io\n"); +break; +case 3: +easing_funct = quadratic_int_io; +console_printf ("Easing: quadratic io\n"); +break; +case 4: +easing_funct = cubic_int_io; +console_printf ("Easing: cubic io\n"); +break; +case 5: +easing_funct = quartic_int_io; +console_printf ("Easing: quartic io\n"); +break; +default: +easing_funct = quintic_int_io; +console_printf ("Easing: quintic io\n"); +} + +if (func_num > 5) { +func_num = 0; +} else { +func_num++; +} +rc = pwm_enable_duty_cycle(pwm, 0, top_val); +assert(rc == 0); +} int pwm_init(void) { -struct pwm_chan_cfg chan_conf = { -.pin = LED_BLINK_PIN, -.inverted = true, -.data = NULL +struct pwm_dev_interrupt_cfg chan_conf = { +.cfg = { +.pin = LED_BLINK_PIN, +.inverted = true, +.n_cycles = pwm_freq * 5, /* 5 seconds */ +.interrupts_cfg = true, +.data = NULL, +}, +.int_prio = 3, +.cycle_handler = pwm_cycle_handler, /* this won't work on soft_pwm */ +.cycle_data = NULL, +.seq_end_handler = pwm_end_seq_handler, /* this won't work on soft_pwm */ +.seq_end_data = NULL }; -uint32_t base_freq; int rc; +chan_conf.seq_end_data = _conf; + #if MYNEWT_VAL(SOFT_PWM) pwm = (struct pwm_dev *) os_dev_open("spwm", 0, NULL); +chan_conf.cfg.interrupts_cfg = false; #else pwm = (struct pwm_dev *) os_dev_open("pwm0", 0, NULL); #endif /* set the PWM frequency */ -pwm_set_frequency(pwm, 1); -base_freq = pwm_get_clock_freq(pwm); -max_val = (uint16_t) (base_freq / 1); - -/* setup led 1 - 100% duty cycle*/ -rc = pwm_chan_config(pwm, 0, _conf); -assert(rc == 0); +pwm_set_frequency(pwm, 1000); +top_val = (uint16_t) pwm_get_top_value(pwm); -rc = pwm_enable_duty_cycle(pwm, 0, max_val); +/* setup led 1 */ +rc = pwm_chan_config(pwm, 0, (struct pwm_chan_cfg*) _conf); assert(rc == 0); -#ifdef LED_2 -/* setup led 2 - 50% duty cycle */ -chan_conf.pin = LED_2; -rc = pwm_chan_config(pwm, 1, _conf); -assert(rc == 0); - -rc = pwm_enable_duty_cycle(pwm, 1, max_val/2); -assert(rc == 0); -#endif -#ifdef LED_3 -/* setup led 3 - 25% duty cycle */ -chan_conf.pin = LED_3; -rc = pwm_chan_config(pwm, 2, _conf); -assert(rc == 0); - -rc = pwm_enable_duty_cycle(pwm, 2, max_val/4); -assert(rc == 0); -#endif -#ifdef LED_4 -/* setup led 4 - 10% duty cycle */ -chan_conf.pin = LED_4; -rc = pwm_chan_config(pwm, 3, _conf); -assert(rc == 0); +console_printf ("Easing: sine io\n"); -rc = pwm_enable_duty_cycle(pwm, 3, max_val/10); +rc = pwm_enable_duty_cycle(pwm, 0, top_val); assert(rc == 0); -#endif return rc; } -static void -pwm_toggle(struct os_event *ev) -{ -int rc; - -
[mynewt-core] branch master updated (00eb38b -> f415e00)
This is an automated email from the ASF dual-hosted git repository. mlaz pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git. from 00eb38b Merge pull request #911 from michal-narajowski/mesh-fixes add e14bd81 wip, implemented PWM cycle interrupt handling add aadd3e8 changing asserts to ret vals add 5e5bd12 Have the user setting the cycle irq priority and setting user_data as handler function parameter. add d4275f7 Added some comments on pwm.h, pwm_ test now breathes on LED_BLINK_PIN using easing lib. add a977703 Added support for n cycles sequences and end of sequence interrupt. add 132dbdb pwm_get_top_value implemented, refactored pwm_chan_cfg with optional interrupt support to more memoy efficient datastructures add e045996 Update pwm.h new f415e00 Merge pull request #836 from mlaz/pwm_interrupt The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: apps/pwm_test/pkg.yml| 1 + apps/pwm_test/src/main.c | 152 -- hw/drivers/pwm/include/pwm/pwm.h | 42 +++- hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c | 343 +++ hw/drivers/pwm/src/pwm.c | 16 ++ 5 files changed, 448 insertions(+), 106 deletions(-) -- To stop receiving notification emails like this one, please contact m...@apache.org.
[GitHub] jacobrosenthal opened a new pull request #913: drivers/debounce: fix documentation
jacobrosenthal opened a new pull request #913: drivers/debounce: fix documentation URL: https://github.com/apache/mynewt-core/pull/913 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jacobrosenthal opened a new pull request #912: nrf targets: remove empty boards.h
jacobrosenthal opened a new pull request #912: nrf targets: remove empty boards.h URL: https://github.com/apache/mynewt-core/pull/912 As discussed within https://github.com/apache/mynewt-core/pull/897 boards.h doesnt seem necessary with current nrfx sdx and can be removed This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mlampert commented on issue #902: Feature: stm32 f3/f7 pll clk off HSI
mlampert commented on issue #902: Feature: stm32 f3/f7 pll clk off HSI URL: https://github.com/apache/mynewt-core/pull/902#issuecomment-372718525 way ahead of you ;) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] sdalu commented on a change in pull request #901: ble service: Device Information Service
sdalu commented on a change in pull request #901: ble service: Device Information Service URL: https://github.com/apache/mynewt-core/pull/901#discussion_r174126014 ## File path: net/nimble/host/services/dis/syscfg.yml ## @@ -0,0 +1,80 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Package: ble/host/services/dis + +syscfg.defs: +BLE_SVC_DIS_MODEL_NUMBER_READ_PERM: +description: > +Defines permissions for writing "Model Number" characteristics. Can Review comment: Perhaps a `BLE_SVC_DIS_DEFAULT_READ_PERM`? And propose the `MYNEWT_VAL_BLE_SVC_DIS_DEFAULT_READ_PERM` as a possible alternative for the `BLE_GATT_CHR_F_READ_*` values in `BLE_SVC_DIS_*_READ_PERM` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[mynewt-core] 01/01: Merge pull request #911 from michal-narajowski/mesh-fixes
This is an automated email from the ASF dual-hosted git repository. naraj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git commit 00eb38b4c4d14b88da05ff0e82b2f8ebf728942c Merge: f816a54 9e4efc6 Author: Michał NarajowskiAuthorDate: Tue Mar 13 13:21:09 2018 +0100 Merge pull request #911 from michal-narajowski/mesh-fixes Mesh fixes apps/blemesh_shell/syscfg.yml| 24 net/nimble/host/mesh/include/mesh/glue.h | 2 +- net/nimble/host/mesh/src/glue.c | 16 net/nimble/host/mesh/src/lpn.c | 2 +- net/nimble/host/mesh/src/net.h | 2 +- net/nimble/host/mesh/src/proxy.c | 4 +++- net/nimble/host/mesh/src/shell.c | 8 7 files changed, 38 insertions(+), 20 deletions(-) -- To stop receiving notification emails like this one, please contact na...@apache.org.
[GitHub] michal-narajowski closed pull request #911: Mesh fixes
michal-narajowski closed pull request #911: Mesh fixes URL: https://github.com/apache/mynewt-core/pull/911 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/apps/blemesh_shell/syscfg.yml b/apps/blemesh_shell/syscfg.yml index 4f854d599..07cde3b41 100644 --- a/apps/blemesh_shell/syscfg.yml +++ b/apps/blemesh_shell/syscfg.yml @@ -51,15 +51,15 @@ syscfg.vals: BLE_MESH_FRIEND: 1 BLE_MESH_CFG_CLI: 1 -BLE_MESH_DEBUG: 1 -BLE_MESH_DEBUG_NET: 1 -BLE_MESH_DEBUG_TRANS: 1 -BLE_MESH_DEBUG_BEACON: 1 -BLE_MESH_DEBUG_CRYPTO: 1 -BLE_MESH_DEBUG_PROV: 1 -BLE_MESH_DEBUG_ACCESS: 1 -BLE_MESH_DEBUG_MODEL: 1 -BLE_MESH_DEBUG_ADV: 1 -BLE_MESH_DEBUG_LOW_POWER: 1 -BLE_MESH_DEBUG_FRIEND: 1 -BLE_MESH_DEBUG_PROXY: 1 +BLE_MESH_DEBUG: 0 +BLE_MESH_DEBUG_NET: 0 +BLE_MESH_DEBUG_TRANS: 0 +BLE_MESH_DEBUG_BEACON: 0 +BLE_MESH_DEBUG_CRYPTO: 0 +BLE_MESH_DEBUG_PROV: 0 +BLE_MESH_DEBUG_ACCESS: 0 +BLE_MESH_DEBUG_MODEL: 0 +BLE_MESH_DEBUG_ADV: 0 +BLE_MESH_DEBUG_LOW_POWER: 0 +BLE_MESH_DEBUG_FRIEND: 0 +BLE_MESH_DEBUG_PROXY: 0 diff --git a/net/nimble/host/mesh/include/mesh/glue.h b/net/nimble/host/mesh/include/mesh/glue.h index b1050d8c6..26ba98f2b 100644 --- a/net/nimble/host/mesh/include/mesh/glue.h +++ b/net/nimble/host/mesh/include/mesh/glue.h @@ -349,7 +349,7 @@ static inline unsigned int find_msb_set(u32_t op) /* Above flags are used with IS_ENABLED macro */ #define IS_ENABLED(config) MYNEWT_VAL(config) -#define CONFIG_BLUETOOTH_MESH_LPN_GROUPSMYNEWT_VAL(BLE_MESH_LPN_GROUPS) +#define CONFIG_BT_MESH_LPN_GROUPS MYNEWT_VAL(BLE_MESH_LPN_GROUPS) #define CONFIG_BT_MESH_ADV_BUF_COUNTMYNEWT_VAL(BLE_MESH_ADV_BUF_COUNT) #define CONFIG_BT_MESH_FRIEND_QUEUE_SIZE MYNEWT_VAL(BLE_MESH_FRIEND_QUEUE_SIZE) #define CONFIG_BT_MESH_FRIEND_RECV_WIN MYNEWT_VAL(BLE_MESH_FRIEND_RECV_WIN) diff --git a/net/nimble/host/mesh/src/glue.c b/net/nimble/host/mesh/src/glue.c index b93d9dbb9..15d8d9b2a 100644 --- a/net/nimble/host/mesh/src/glue.c +++ b/net/nimble/host/mesh/src/glue.c @@ -491,6 +491,22 @@ bt_le_adv_start(const struct ble_gap_adv_params *param, return err; } +if (sd) { +buf_len = 0; + +err = set_ad(sd, sd_len, buf, _len); +if (err) { +BT_ERR("Advertising failed: err %d", err); +return err; +} + +err = ble_gap_adv_rsp_set_data(buf, buf_len); +if (err != 0) { +BT_ERR("Advertising failed: err %d", err); +return err; +} +} + err = ble_gap_adv_start(g_mesh_addr_type, NULL, BLE_HS_FOREVER, param, NULL, NULL); if (err) { diff --git a/net/nimble/host/mesh/src/lpn.c b/net/nimble/host/mesh/src/lpn.c index 165bc23b9..0cc462298 100644 --- a/net/nimble/host/mesh/src/lpn.c +++ b/net/nimble/host/mesh/src/lpn.c @@ -613,7 +613,7 @@ static void lpn_group_del(u16_t group) static inline int group_popcount(atomic_t *target) { -#if CONFIG_BLUETOOTH_MESH_LPN_GROUPS > 32 +#if CONFIG_BT_MESH_LPN_GROUPS > 32 int i, count = 0; for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { diff --git a/net/nimble/host/mesh/src/net.h b/net/nimble/host/mesh/src/net.h index 24940a648..5e11aa27b 100644 --- a/net/nimble/host/mesh/src/net.h +++ b/net/nimble/host/mesh/src/net.h @@ -121,7 +121,7 @@ struct bt_mesh_friend { }; #if (MYNEWT_VAL(BLE_MESH_LOW_POWER)) -#define LPN_GROUPS MYNEWT_VAL(BLE_MESH_LOW_POWER) +#define LPN_GROUPS CONFIG_BT_MESH_LPN_GROUPS #else #define LPN_GROUPS 0 #endif diff --git a/net/nimble/host/mesh/src/proxy.c b/net/nimble/host/mesh/src/proxy.c index 1fe531752..4ec2cbe35 100644 --- a/net/nimble/host/mesh/src/proxy.c +++ b/net/nimble/host/mesh/src/proxy.c @@ -81,13 +81,15 @@ ble_uuid16_t BT_UUID_MESH_PROXY_DATA_OUT = BLE_UUID16_INIT(0x2ade); #define CLIENT_BUF_SIZE 68 static const struct ble_gap_adv_params slow_adv_param = { - .conn_mode = (BLE_GAP_CONN_MODE_UND ), + .conn_mode = (BLE_GAP_CONN_MODE_UND), + .disc_mode = (BLE_GAP_DISC_MODE_GEN), .itvl_min = BT_GAP_ADV_SLOW_INT_MIN, .itvl_max = BT_GAP_ADV_SLOW_INT_MAX, }; static const struct ble_gap_adv_params fast_adv_param = { .conn_mode = (BLE_GAP_CONN_MODE_UND), + .disc_mode = (BLE_GAP_DISC_MODE_GEN), .itvl_min = BT_GAP_ADV_FAST_INT_MIN_2, .itvl_max = BT_GAP_ADV_FAST_INT_MAX_2, }; diff --git a/net/nimble/host/mesh/src/shell.c b/net/nimble/host/mesh/src/shell.c index 8a5cb38b6..03ea6dd70 100644 --- a/net/nimble/host/mesh/src/shell.c +++ b/net/nimble/host/mesh/src/shell.c @@ -65,7 +65,7 @@ static struct { static struct bt_mesh_cfg_srv cfg_srv = { .relay = BT_MESH_RELAY_DISABLED, -
[GitHub] rymanluk closed pull request #883: nimble/ll: Improve extended scan/connect when host request both PHYs to be used
rymanluk closed pull request #883: nimble/ll: Improve extended scan/connect when host request both PHYs to be used URL: https://github.com/apache/mynewt-core/pull/883 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/net/nimble/controller/src/ble_ll_scan.c b/net/nimble/controller/src/ble_ll_scan.c index b20cbfc99..76559ef85 100644 --- a/net/nimble/controller/src/ble_ll_scan.c +++ b/net/nimble/controller/src/ble_ll_scan.c @@ -1001,7 +1001,7 @@ ble_ll_scan_start(struct ble_ll_scan_sm *scansm, struct ble_ll_sched_item *sch) rc = ble_phy_rx_set_start_time(os_cputime_get32() + g_ble_ll_sched_offset_ticks, 0); } -if (!rc) { +if (!rc || rc == BLE_PHY_ERR_RX_LATE) { /* Enable/disable whitelisting */ if (scanphy->scan_filt_policy & 1) { ble_ll_whitelist_enable(); @@ -1244,9 +1244,9 @@ ble_ll_scan_switch_phy(struct ble_ll_scan_sm *scansm) * * @param arg */ -static uint32_t +static bool ble_ll_scan_start_next_phy(struct ble_ll_scan_sm *scansm, - uint32_t next_event_time) + uint32_t *next_event_time) { struct ble_ll_scan_params *cur_phy; struct ble_ll_scan_params *next_phy; @@ -1256,35 +1256,33 @@ ble_ll_scan_start_next_phy(struct ble_ll_scan_sm *scansm, /* Lets check if we want to switch to other PHY */ if (scansm->cur_phy == scansm->next_phy || scansm->next_phy == PHY_NOT_CONFIGURED) { -return next_event_time; +return false; } cur_phy = >phy_data[scansm->cur_phy]; next_phy = >phy_data[scansm->next_phy]; -cur_phy->next_event_start = next_event_time; +/* Store next event for current phy */ +cur_phy->next_event_start = *next_event_time; -if ((int32_t)(next_phy->next_event_start - next_event_time)< 0) { -/* Other PHY already wanted to scan. Allow it */ -ble_ll_scan_switch_phy(scansm); -now = os_cputime_get32(); -if ((int32_t)(next_phy->next_event_start - now) <= 0) { -/* Start with new channel only if PHY was scanning already */ -if (next_phy->next_event_start != 0) { -next_phy->scan_chan = - ble_ll_scan_get_next_adv_prim_chan(next_phy->scan_chan); -} -next_phy->scan_win_start_time = now; -win = os_cputime_usecs_to_ticks(next_phy->scan_window * -BLE_HCI_SCAN_ITVL); +/* Other PHY already wanted to scan. Allow it */ +ble_ll_scan_switch_phy(scansm); -next_phy->next_event_start = now + win; -ble_ll_scan_start(scansm, NULL); -} -next_event_time = next_phy->next_event_start; +now = os_cputime_get32(); + +/* Start with new channel only if PHY was scanning already */ +if (next_phy->next_event_start != 0) { +next_phy->scan_chan = +ble_ll_scan_get_next_adv_prim_chan(next_phy->scan_chan); } +next_phy->scan_win_start_time = now; +win = os_cputime_usecs_to_ticks(next_phy->scan_window * +BLE_HCI_SCAN_ITVL); -return next_event_time; +next_phy->next_event_start = now + win; + +*next_event_time = next_phy->next_event_start; +return true; } static void @@ -1369,6 +1367,16 @@ ble_ll_scan_event_proc(struct os_event *ev) next_event_time = win_start + scan_itvl; } +#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) +if (inside_window == 0 && +ble_ll_scan_start_next_phy(scansm, _event_time)) { +/* Check if we should start next phy. If so let's say we are inside + * the window + */ +inside_window = 1; +} +#endif + /* * If we are not in the standby state it means that the scheduled * scanning event was overlapped in the schedule. In this case all we do @@ -1379,7 +1387,7 @@ ble_ll_scan_event_proc(struct os_event *ev) case BLE_LL_STATE_ADV: case BLE_LL_STATE_CONNECTION: start_scan = 0; -break; + break; case BLE_LL_STATE_INITIATING: /* Must disable PHY since we will move to a new channel */ ble_phy_disable(); @@ -1403,30 +1411,6 @@ ble_ll_scan_event_proc(struct os_event *ev) break; } -#ifdef BLE_XCVR_RFCLK -if (inside_window == 0) { -/* - * We need to wake up before we need to start scanning in order - * to make sure the rfclock is on. If we are close to being on, - * enable the rfclock. If not, set wakeup time. - */ -if (dt >= (scan_itvl - g_ble_ll_data.ll_xtal_ticks)) { -/* Start the clock if necessary */
[mynewt-core] 01/01: Merge pull request #883 from rymanluk/scan_ext_impr
This is an automated email from the ASF dual-hosted git repository. rymek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git commit f816a547943a826e058f7f17e0c892b6e1fbc493 Merge: 3c64f97 fc457f1 Author: Łukasz RymanowskiAuthorDate: Tue Mar 13 13:18:51 2018 +0100 Merge pull request #883 from rymanluk/scan_ext_impr nimble/ll: Improve extended scan/connect when host request both PHYs to be used net/nimble/controller/src/ble_ll_scan.c | 160 ++-- 1 file changed, 89 insertions(+), 71 deletions(-) -- To stop receiving notification emails like this one, please contact ry...@apache.org.
[mynewt-core] branch master updated (3c64f97 -> f816a54)
This is an automated email from the ASF dual-hosted git repository. rymek pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git. from 3c64f97 Merge pull request #896 from andrzej-kaczmarek/log-api-fix add 178ff7a nimble/ll: Allow to be late on RX when scanning add 09c3e68 nimble/ll: Minor coding style fix add 1efe9e5 nimble/ll: Improve extended scanner for both PHYs add 6258e86 nimble/ll: Support scan on two PHYs when continous scanning requested add fc457f1 nimble/ll: Fix extended connect when using both PHYs for scanning new f816a54 Merge pull request #883 from rymanluk/scan_ext_impr The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: net/nimble/controller/src/ble_ll_scan.c | 160 ++-- 1 file changed, 89 insertions(+), 71 deletions(-) -- To stop receiving notification emails like this one, please contact ry...@apache.org.
[GitHub] andrzej-kaczmarek commented on a change in pull request #904: ble service: Battery Service
andrzej-kaczmarek commented on a change in pull request #904: ble service: Battery Service URL: https://github.com/apache/mynewt-core/pull/904#discussion_r174080382 ## File path: net/nimble/host/services/bas/syscfg.yml ## @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +syscfg.defs: +BLE_SVC_BAS_BATTERY_LEVEL_PERM: +description: > +Defines permissions for writing "Battery Level" characteristics. Can +be zero to allow write without extra permissions or combination of: +BLE_GATT_CHR_F_READ_ENC +BLE_GATT_CHR_F_READ_AUTHEN +BLE_GATT_CHR_F_READ_AUTHOR +value: 0 +BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY: +description: > +Set to BLE_GATT_CHR_F_NOTIFY to support notification, +or 0 to disable it. +value: BLE_GATT_CHR_F_NOTIFY Review comment: Based on some informations scattered in different places of spec, notifications should most likely follow permissions of CCCD. However, NimBLE does not allow to set them and obviously also does not enforce them so there's nothing to set here actually :) I'd leave this as NOTIFY_ENABLE 0/1 syscfg for now and I'll look into adding appropriate support in Mynewt - we can then add NOTIFY_PERM syscfg and update code accordingly. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] michal-narajowski opened a new pull request #147: Cmake fixes
michal-narajowski opened a new pull request #147: Cmake fixes URL: https://github.com/apache/mynewt-newt/pull/147 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] utzig commented on issue #902: Feature: stm32 f3/f7 pll clk off HSI
utzig commented on issue #902: Feature: stm32 f3/f7 pll clk off HSI URL: https://github.com/apache/mynewt-core/pull/902#issuecomment-372608757 Ok, this now has conflicts because I removed `hal_system.c` from all models to a common location shared between all. Yours added the clock config code so I would suggest you make a new file like `hal_system_clock.c` for example when rebasing on latest master. Btw, I can reapply the clock settings on the F3 (already tested here yesterday!). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] utzig commented on issue #902: Feature: stm32 f3/f7 pll clk off HSI
utzig commented on issue #902: Feature: stm32 f3/f7 pll clk off HSI URL: https://github.com/apache/mynewt-core/pull/902#issuecomment-372608757 Ok, this now has conflicts because I removed `hal_system.c` from all models to a common location shared between all. Yours added the clock config code so I would suggest you make a new file like `hal_system_clock.c` for example when rebasing on latest master. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] michal-narajowski opened a new pull request #911: Mesh fixes
michal-narajowski opened a new pull request #911: Mesh fixes URL: https://github.com/apache/mynewt-core/pull/911 This PR contains mostly fixes for GATT Proxy and for using Bluetooth Mesh Android app This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services