[GitHub] jacobrosenthal commented on issue #980: util/button: Use the button id in callback instead of button pointer

2018-03-30 Thread GitBox
jacobrosenthal commented on issue #980: util/button: Use the button id in 
callback instead of button pointer
URL: https://github.com/apache/mynewt-core/pull/980#issuecomment-377655058
 
 
   Separate from this. But thoughts on returning os callbacks to make these
   more newty. Could put which queue you want it returned in. I find I end up
   wrapping all this when I use it anyway.
   
   On Sat, Mar 31, 2018, 12:13 AM sdalu  wrote:
   
   > It doesn't look useful to have the whole button structure exposed in the
   > user callback
   > --
   > You can view, comment on, or merge this pull request online at:
   >
   >   https://github.com/apache/mynewt-core/pull/980
   > Commit Summary
   >
   >- Use the button id in callback instead of the button pointer
   >
   > File Changes
   >
   >- *M* hw/util/button/include/button/button.h
   > (16)
   >- *M* hw/util/button/src/button.c
   > (2)
   >
   > Patch Links:
   >
   >- https://github.com/apache/mynewt-core/pull/980.patch
   >- https://github.com/apache/mynewt-core/pull/980.diff
   >
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub
   > , or mute the thread
   > 

   > .
   >
   


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] ncasaril commented on issue #940: nrf52xxx_i2c: Fix to allow hal_i2c_clear_bus to read from input-buffer

2018-03-30 Thread GitBox
ncasaril commented on issue #940: nrf52xxx_i2c: Fix to allow hal_i2c_clear_bus 
to read from input-buffer 
URL: https://github.com/apache/mynewt-core/pull/940#issuecomment-377636234
 
 
   @vrahane I think I understand that it would need to be resolved to a port, 
but the same thing would then apply to the hal_i2c_init function? And also to 
the NRF_>PIN_CNF[] section above my change in hal_i2c_clear_bus, right? 
   
   Or, are we in fact looking at two different changes that needs to happen to 
the hal_i2c.c. One to allow the clearing of the bus and one to allow the 
hal_i2c* to work with the nrf52840?


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] ccollins476ad commented on issue #934: util/parse - Additional parsing functions.

2018-03-30 Thread GitBox
ccollins476ad commented on issue #934: util/parse - Additional parsing 
functions.
URL: https://github.com/apache/mynewt-core/pull/934#issuecomment-377631716
 
 
   FYI- there was a bug in parsing address strings with leading double colons 
(e.g., "::1:2:3:4").  I just force pushed a fix.


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 opened a new pull request #983: Some fixes for C++ compatibility.

2018-03-30 Thread GitBox
mlampert opened a new pull request #983: Some fixes for C++ compatibility.
URL: https://github.com/apache/mynewt-core/pull/983
 
 
   Ran into issues compiling a C++ source code with
   `arm-none-eabi-c++ (15:6.3.1+svn253039-1+b1) 6.3.1 20170620`
   


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 #947: Refactor/easing library

2018-03-30 Thread GitBox
mlampert commented on issue #947: Refactor/easing library
URL: https://github.com/apache/mynewt-core/pull/947#issuecomment-377616242
 
 
   A general comment on the "precision" question.
   
   I love the library, use it all the time ever since the PR was posted the 
first time. Yet, as is it is IMHO not very practical because it's resource 
requirements are too high. The reason I started looking into this was because 
the output of `console` started to have pauses (in the middle of printing a 
word) when I used the library for a single LED.
   
   Having this library is insanely cool but I cannot afford 0.5-1ms execution 
times in a timer interrupt callback.
   
   Maybe I'm missing a use case here - is there one that requires `double` 
precision?


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 a change in pull request #947: Refactor/easing library

2018-03-30 Thread GitBox
mlampert commented on a change in pull request #947: Refactor/easing library
URL: https://github.com/apache/mynewt-core/pull/947#discussion_r178368672
 
 

 ##
 File path: util/easing/src/easing.c
 ##
 @@ -69,125 +69,128 @@ static inline float quadratic_in(float step, float 
max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 2);
+   return max_val * (ratio * ratio);
 }
 
 static inline float quadratic_out(float step, float max_steps, float max_val)
 {
 float ratio = step / max_steps;
 
-   return -max_val * ratio * (ratio - 2.0);
+   return -max_val * ratio * (ratio - 2.0f);
 }
 
 static inline float quadratic_io(float step, float max_steps, float max_val)
 {
-   float ratio = step / (max_steps / 2.0);
+   float ratio = step / (max_steps / 2.0f);
 
if (ratio < 1)
-   return max_val / 2.0 * pow(ratio, 2);
+   return max_val / 2.0f * (ratio * ratio);
 
-ratio = (step - (max_steps/2.0)) / (max_steps/2.0);
-return (max_val / 2.0) - (max_val / 2.0) * ratio * (ratio - 2.0);
+ratio = (step - (max_steps/2.0f)) / (max_steps/2.0f);
+return (max_val / 2.0f) - (max_val / 2.0f) * ratio * (ratio - 2.0f);
 }
 
 /* Cubic */
 static inline float cubic_in(float step, float max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 3);
+   return max_val * (ratio * ratio * ratio);
 
 Review comment:
   Understood - but I cannot answer that question without a reference. The 
interface does not suggest that there is `double` precision involved, it's all 
based on `float` so as a user that's as much as I can expect. In order to 
answer the question if this refactoring falsifies the result we would need a 
definition as to what level of deviation is acceptable.
   
   In addition none of the computations uses accumulation which is where 
`float`'s really start bleeding. All values are monotonically increasing or 
decreasing and the result is converted to a float. So if the initial value and 
the result fits into a `float` then every intermediary value will also fit.


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 a change in pull request #947: Refactor/easing library

2018-03-30 Thread GitBox
mlampert commented on a change in pull request #947: Refactor/easing library
URL: https://github.com/apache/mynewt-core/pull/947#discussion_r178368672
 
 

 ##
 File path: util/easing/src/easing.c
 ##
 @@ -69,125 +69,128 @@ static inline float quadratic_in(float step, float 
max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 2);
+   return max_val * (ratio * ratio);
 }
 
 static inline float quadratic_out(float step, float max_steps, float max_val)
 {
 float ratio = step / max_steps;
 
-   return -max_val * ratio * (ratio - 2.0);
+   return -max_val * ratio * (ratio - 2.0f);
 }
 
 static inline float quadratic_io(float step, float max_steps, float max_val)
 {
-   float ratio = step / (max_steps / 2.0);
+   float ratio = step / (max_steps / 2.0f);
 
if (ratio < 1)
-   return max_val / 2.0 * pow(ratio, 2);
+   return max_val / 2.0f * (ratio * ratio);
 
-ratio = (step - (max_steps/2.0)) / (max_steps/2.0);
-return (max_val / 2.0) - (max_val / 2.0) * ratio * (ratio - 2.0);
+ratio = (step - (max_steps/2.0f)) / (max_steps/2.0f);
+return (max_val / 2.0f) - (max_val / 2.0f) * ratio * (ratio - 2.0f);
 }
 
 /* Cubic */
 static inline float cubic_in(float step, float max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 3);
+   return max_val * (ratio * ratio * ratio);
 
 Review comment:
   Understood - but I cannot answer that question without a reference. The 
interface does not suggest that there is `double` precision involved, it's all 
based on `float` so as a user that's as much as I can expect. In order to 
answer the question if this refactoring falsifies the result we would need a 
definition as to what level of deviation is acceptable.
   
   In addition none of the computations uses accumulation which is where 
`float`'s really start bleeding, all values are monotonically increasing or 
decreasing and the result is converted to a float. So if the initial value and 
the result fits into a `float` then every intermediary value will also fit.


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 a change in pull request #947: Refactor/easing library

2018-03-30 Thread GitBox
mlampert commented on a change in pull request #947: Refactor/easing library
URL: https://github.com/apache/mynewt-core/pull/947#discussion_r178368006
 
 

 ##
 File path: util/easing/src/easing.c
 ##
 @@ -43,12 +43,12 @@ static inline float exponential_out(float step, float 
max_steps, float max_val)
 {
return (step == max_steps) ?
 max_val :
-max_val - pow(max_val, 1.0 - (float)step/max_steps);
+max_val - pow(max_val, 1.0f - (float)step/max_steps);
 
 Review comment:
   I'm not sure why the original implementation had that cast there, it was 
promoted to a `double` anyway. I presume that early on `step` and `max_step` 
were integer values and it was a remnant of refactoring. I can certainly clean 
those up.


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 a change in pull request #947: Refactor/easing library

2018-03-30 Thread GitBox
mlampert commented on a change in pull request #947: Refactor/easing library
URL: https://github.com/apache/mynewt-core/pull/947#discussion_r178365725
 
 

 ##
 File path: util/easing/src/easing.c
 ##
 @@ -69,125 +69,128 @@ static inline float quadratic_in(float step, float 
max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 2);
+   return max_val * (ratio * ratio);
 }
 
 static inline float quadratic_out(float step, float max_steps, float max_val)
 {
 float ratio = step / max_steps;
 
-   return -max_val * ratio * (ratio - 2.0);
+   return -max_val * ratio * (ratio - 2.0f);
 }
 
 static inline float quadratic_io(float step, float max_steps, float max_val)
 {
-   float ratio = step / (max_steps / 2.0);
+   float ratio = step / (max_steps / 2.0f);
 
if (ratio < 1)
-   return max_val / 2.0 * pow(ratio, 2);
+   return max_val / 2.0f * (ratio * ratio);
 
-ratio = (step - (max_steps/2.0)) / (max_steps/2.0);
-return (max_val / 2.0) - (max_val / 2.0) * ratio * (ratio - 2.0);
+ratio = (step - (max_steps/2.0f)) / (max_steps/2.0f);
+return (max_val / 2.0f) - (max_val / 2.0f) * ratio * (ratio - 2.0f);
 }
 
 /* Cubic */
 static inline float cubic_in(float step, float max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 3);
+   return max_val * (ratio * ratio * ratio);
 }
 
 static inline float cubic_out(float step, float max_steps, float max_val)
 {
-   float ratio = step / (max_steps - 1.0);
+   float ratio = step / (max_steps - 1.0f);
 
-   return max_val * (pow(ratio, 3) + 1);
+   return max_val * ((ratio * ratio * ratio) + 1);
 }
 
 static inline float cubic_io(float step, float max_steps, float max_val)
 {
-   float ratio = step / (max_steps / 2.0);
+   float ratio = step / (max_steps / 2.0f);
 
if (ratio < 1)
-   return max_val / 2 * pow(ratio, 3);
+   return max_val / 2 * (ratio * ratio * ratio);
 
-   return max_val / 2 * (pow(ratio - 2, 3) + 2);
+ratio -= 2;
+   return max_val / 2 * ((ratio * ratio * ratio) + 2);
 }
 
 /* Quartic */
 static inline float quartic_in(float step, float max_steps, float max_val)
 {
float ratio = step / max_steps;
 
-   return max_val * pow(ratio, 4);
+   return max_val * (ratio * ratio * ratio * ratio);
 }
 
 static inline float quartic_out(float step, float max_steps, float max_val)
 {
-   float ratio = (step / max_steps) - 1.0;
+   float ratio = (step / max_steps) - 1.0f;
 
-   return max_val + max_val * pow(ratio, 5);
+   return max_val + max_val * (ratio * ratio * ratio * ratio * ratio);
 }
 
 static inline float quartic_io(float step, float max_steps, float max_val)
 {
-   float ratio = step / (max_steps / 2.0);
+   float ratio = step / (max_steps / 2.0f);
 
if (ratio < 1)
-   return max_val / 2 * pow(ratio, 4);
+   return max_val / 2 * (ratio * ratio * ratio * ratio);
 
-   return max_val + max_val / 2 * pow(ratio -2, 5);
+ratio -= 2;
 
 Review comment:
   the weird identation comes from the original source code having tab 
characters in some places and github uses tabstop=8. I didn't clean up the tabs 
because it introduces a lot of noise into the code review but can certainly do 
that.


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] ccollins476ad opened a new issue #24: Helper functions for subscribing to notifications / indications

2018-03-30 Thread GitBox
ccollins476ad opened a new issue #24: Helper functions for subscribing to 
notifications / indications
URL: https://github.com/apache/mynewt-nimble/issues/24
 
 
   Currently, an application subscribes to notifications or indications by 
performing a GATT write procedure on the appropriate CCCD.  Knowing which 
two-byte pattern to write, and remembering to use little-endian, feels a bit 
too low-level to impose on the application developer.
   
   I suggest we add two helper functions:
   ```
   int
   ble_gattc_subscribe_notifications(uint16_t conn_handle, uint16_t cccd_handle,
 ble_gatt_attr_fn *cb, void *cb_arg);
   int
   ble_gattc_subscribe_indications(uint16_t conn_handle, uint16_t cccd_handle,
   ble_gatt_attr_fn *cb, void *cb_arg);
   ```


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] vrahane commented on issue #940: nrf52xxx_i2c: Fix to allow hal_i2c_clear_bus to read from input-buffer

2018-03-30 Thread GitBox
vrahane commented on issue #940: nrf52xxx_i2c: Fix to allow hal_i2c_clear_bus 
to read from input-buffer 
URL: https://github.com/apache/mynewt-core/pull/940#issuecomment-377584468
 
 
   @ncasaril hope you got what I mean in the above comment ?


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] vrahane closed pull request #982: Requesting-lp5523_registers enum additions to lp5523.h

2018-03-30 Thread GitBox
vrahane closed pull request #982: Requesting-lp5523_registers enum additions to 
lp5523.h
URL: https://github.com/apache/mynewt-core/pull/982
 
 
   

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/hw/drivers/lp5523/include/lp5523/lp5523.h 
b/hw/drivers/lp5523/include/lp5523/lp5523.h
index 0b8a758a9..465817447 100644
--- a/hw/drivers/lp5523/include/lp5523/lp5523.h
+++ b/hw/drivers/lp5523/include/lp5523/lp5523.h
@@ -92,6 +92,9 @@ enum lp5523_engine_control_registers {
 
 enum lp5523_registers {
 LP5523_ENABLE = 0x00,
+LP5523_LED_OUTPUT_CTRL = 0x05,
+LP5523_LED_CONTROL_BASE = 0x06,
+LP5523_PWM_BASE = 0x16,
 LP5523_MISC = 0x36,
 LP5523_STATUS = 0x3a,
 LP5523_INTERRUPT = 0x3a,
@@ -103,8 +106,17 @@ enum lp5523_registers {
 LP5523_TEMPERATURE_WRITE = 0x40,
 LP5523_LED_TEST_CONTROL = 0x41,
 LP5523_LED_TEST_ADC = 0x42,
+LP5523_ENG1_PROG_START_ADDR = 0x4c,
+LP5523_ENG2_PROG_START_ADDR = 0x4d,
+LP5523_ENG3_PROG_START_ADDR = 0x4e,
 LP5523_PROG_MEM_PAGE_SEL = 0x4f,
+LP5523_LED_MASTER_FADER1 = 0x48,
+LP5523_LED_MASTER_FADER2 = 0x49,
+LP5523_LED_MASTER_FADER3 = 0x4A,
 LP5523_PROGRAM_MEMORY = 0x50,
+LP5523_ENG1_MAPPING_MSB = 0X70,
+LP5523_ENG2_MAPPING_MSB = 0X72,
+LP5523_ENG3_MAPPING_MSB = 0X74,
 LP5523_GAIN_CHANGE_CTRL = 0x76
 };
 


 


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] vrahane commented on issue #982: Requesting-lp5523_registers enum additions to lp5523.h

2018-03-30 Thread GitBox
vrahane commented on issue #982: Requesting-lp5523_registers enum additions to 
lp5523.h
URL: https://github.com/apache/mynewt-core/pull/982#issuecomment-377579698
 
 
   Already merged.


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] JustineKH opened a new pull request #982: Requesting-lp5523_registers enum additions to lp5523.h

2018-03-30 Thread GitBox
JustineKH opened a new pull request #982: Requesting-lp5523_registers enum 
additions to lp5523.h
URL: https://github.com/apache/mynewt-core/pull/982
 
 
   Tabs to spaces--rebased


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: Requesting-lp5523_registers enum additions to lp5523.h (#981)

2018-03-30 Thread vipulrahane
This is an automated email from the ASF dual-hosted git repository.

vipulrahane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new cdf5ed9  Requesting-lp5523_registers enum additions to lp5523.h (#981)
cdf5ed9 is described below

commit cdf5ed9215bb13291696086ef71af1f4f13160b7
Author: JustineKH <35044800+justin...@users.noreply.github.com>
AuthorDate: Fri Mar 30 10:32:12 2018 -0700

Requesting-lp5523_registers enum additions to lp5523.h (#981)

* Requesting-lp5523_registers enum additions to lp5523.h
---
 hw/drivers/lp5523/include/lp5523/lp5523.h | 12 
 1 file changed, 12 insertions(+)

diff --git a/hw/drivers/lp5523/include/lp5523/lp5523.h 
b/hw/drivers/lp5523/include/lp5523/lp5523.h
index 0b8a758..4658174 100644
--- a/hw/drivers/lp5523/include/lp5523/lp5523.h
+++ b/hw/drivers/lp5523/include/lp5523/lp5523.h
@@ -92,6 +92,9 @@ enum lp5523_engine_control_registers {
 
 enum lp5523_registers {
 LP5523_ENABLE = 0x00,
+LP5523_LED_OUTPUT_CTRL = 0x05,
+LP5523_LED_CONTROL_BASE = 0x06,
+LP5523_PWM_BASE = 0x16,
 LP5523_MISC = 0x36,
 LP5523_STATUS = 0x3a,
 LP5523_INTERRUPT = 0x3a,
@@ -103,8 +106,17 @@ enum lp5523_registers {
 LP5523_TEMPERATURE_WRITE = 0x40,
 LP5523_LED_TEST_CONTROL = 0x41,
 LP5523_LED_TEST_ADC = 0x42,
+LP5523_ENG1_PROG_START_ADDR = 0x4c,
+LP5523_ENG2_PROG_START_ADDR = 0x4d,
+LP5523_ENG3_PROG_START_ADDR = 0x4e,
 LP5523_PROG_MEM_PAGE_SEL = 0x4f,
+LP5523_LED_MASTER_FADER1 = 0x48,
+LP5523_LED_MASTER_FADER2 = 0x49,
+LP5523_LED_MASTER_FADER3 = 0x4A,
 LP5523_PROGRAM_MEMORY = 0x50,
+LP5523_ENG1_MAPPING_MSB = 0X70,
+LP5523_ENG2_MAPPING_MSB = 0X72,
+LP5523_ENG3_MAPPING_MSB = 0X74,
 LP5523_GAIN_CHANGE_CTRL = 0x76
 };
 

-- 
To stop receiving notification emails like this one, please contact
vipulrah...@apache.org.


[GitHub] vrahane closed pull request #981: Requesting-lp5523_registers enum additions to lp5523.h

2018-03-30 Thread GitBox
vrahane closed pull request #981: Requesting-lp5523_registers enum additions to 
lp5523.h
URL: https://github.com/apache/mynewt-core/pull/981
 
 
   

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/hw/drivers/lp5523/include/lp5523/lp5523.h 
b/hw/drivers/lp5523/include/lp5523/lp5523.h
index 0b8a758a9..465817447 100644
--- a/hw/drivers/lp5523/include/lp5523/lp5523.h
+++ b/hw/drivers/lp5523/include/lp5523/lp5523.h
@@ -92,6 +92,9 @@ enum lp5523_engine_control_registers {
 
 enum lp5523_registers {
 LP5523_ENABLE = 0x00,
+LP5523_LED_OUTPUT_CTRL = 0x05,
+LP5523_LED_CONTROL_BASE = 0x06,
+LP5523_PWM_BASE = 0x16,
 LP5523_MISC = 0x36,
 LP5523_STATUS = 0x3a,
 LP5523_INTERRUPT = 0x3a,
@@ -103,8 +106,17 @@ enum lp5523_registers {
 LP5523_TEMPERATURE_WRITE = 0x40,
 LP5523_LED_TEST_CONTROL = 0x41,
 LP5523_LED_TEST_ADC = 0x42,
+LP5523_ENG1_PROG_START_ADDR = 0x4c,
+LP5523_ENG2_PROG_START_ADDR = 0x4d,
+LP5523_ENG3_PROG_START_ADDR = 0x4e,
 LP5523_PROG_MEM_PAGE_SEL = 0x4f,
+LP5523_LED_MASTER_FADER1 = 0x48,
+LP5523_LED_MASTER_FADER2 = 0x49,
+LP5523_LED_MASTER_FADER3 = 0x4A,
 LP5523_PROGRAM_MEMORY = 0x50,
+LP5523_ENG1_MAPPING_MSB = 0X70,
+LP5523_ENG2_MAPPING_MSB = 0X72,
+LP5523_ENG3_MAPPING_MSB = 0X74,
 LP5523_GAIN_CHANGE_CTRL = 0x76
 };
 


 


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] JustineKH opened a new pull request #981: Requesting-lp5523_registers enum additions to lp5523.h

2018-03-30 Thread GitBox
JustineKH opened a new pull request #981: Requesting-lp5523_registers enum 
additions to lp5523.h
URL: https://github.com/apache/mynewt-core/pull/981
 
 
   Added lp5523 register values to lp5523_resgister enum. 


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 (2268a67 -> 9c38bea)

2018-03-30 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.


from 2268a67  Fix boot_serial to follow flash write alignment
 add 9d1e7bd  Don't include os/mynewt.h from primitive headers.
 new 9c38bea  Merge pull request #979 from ccollins476ad/mynewt.h

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:
 hw/hal/include/hal/hal_timer.h| 2 +-
 libc/baselibc/include/assert.h| 2 +-
 sys/sysinit/include/sysinit/sysinit.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
ccoll...@apache.org.


[GitHub] ccollins476ad closed pull request #979: Don't include os/mynewt.h from primitive headers.

2018-03-30 Thread GitBox
ccollins476ad closed pull request #979: Don't include os/mynewt.h from 
primitive headers.
URL: https://github.com/apache/mynewt-core/pull/979
 
 
   

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/hw/hal/include/hal/hal_timer.h b/hw/hal/include/hal/hal_timer.h
index 90ccda581..be41c6095 100644
--- a/hw/hal/include/hal/hal_timer.h
+++ b/hw/hal/include/hal/hal_timer.h
@@ -29,7 +29,7 @@
 #define H_HAL_TIMER_
 
 #include 
-#include "os/mynewt.h"
+#include "os/queue.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/libc/baselibc/include/assert.h b/libc/baselibc/include/assert.h
index e291bb5af..8a131b5b8 100644
--- a/libc/baselibc/include/assert.h
+++ b/libc/baselibc/include/assert.h
@@ -5,7 +5,7 @@
 #ifndef _ASSERT_H
 #define _ASSERT_H
 
-#include "os/mynewt.h"
+#include "syscfg/syscfg.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sys/sysinit/include/sysinit/sysinit.h 
b/sys/sysinit/include/sysinit/sysinit.h
index 9c0a2bf5c..7694c428a 100644
--- a/sys/sysinit/include/sysinit/sysinit.h
+++ b/sys/sysinit/include/sysinit/sysinit.h
@@ -22,7 +22,7 @@
 
 #include 
 #include 
-#include "os/mynewt.h"
+#include "syscfg/syscfg.h"
 
 #if MYNEWT_VAL(SPLIT_APPLICATION)
 #include "split/split.h"


 


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 opened a new pull request #980: util/button: Use the button id in callback instead of button pointer

2018-03-30 Thread GitBox
sdalu opened a new pull request #980: util/button: Use the button id in 
callback instead of button pointer
URL: https://github.com/apache/mynewt-core/pull/980
 
 
   It doesn't look useful to have the whole button structure exposed in the 
user callback


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 closed pull request #978: Fix boot_serial to follow flash write alignment

2018-03-30 Thread GitBox
utzig closed pull request #978: Fix boot_serial to follow flash write alignment
URL: https://github.com/apache/mynewt-core/pull/978
 
 
   

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/boot/boot_serial/src/boot_serial.c 
b/boot/boot_serial/src/boot_serial.c
index b6574d435..7bc666893 100644
--- a/boot/boot_serial/src/boot_serial.c
+++ b/boot/boot_serial/src/boot_serial.c
@@ -190,6 +190,7 @@ bs_upload(char *buf, int len)
 uint8_t img_data[512];
 long long int off = UINT_MAX;
 size_t img_blen = 0;
+uint8_t rem_bytes;
 long long int data_len = UINT_MAX;
 size_t slen;
 char name_str[8];
@@ -314,6 +315,12 @@ bs_upload(char *buf, int len)
 rc = 0;
 goto out;
 }
+if (curr_off + img_blen < img_size) {
+rem_bytes = img_blen % flash_area_align(fap);
+if (rem_bytes) {
+img_blen -= rem_bytes;
+}
+}
 rc = flash_area_write(fap, curr_off, img_data, img_blen);
 if (rc == 0) {
 curr_off += img_blen;


 


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: Fix slot0 size in f3disco to avoid writing after end

2018-03-30 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new ebc6bd1  Fix slot0 size in f3disco to avoid writing after end
ebc6bd1 is described below

commit ebc6bd1606b0abac16f939f78df64173bb8c15e4
Author: Fabio Utzig 
AuthorDate: Thu Mar 29 16:32:01 2018 -0300

Fix slot0 size in f3disco to avoid writing after end

Signed-off-by: Fabio Utzig 
---
 hw/bsp/stm32f3discovery/stm32f3discovery.ld | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/bsp/stm32f3discovery/stm32f3discovery.ld 
b/hw/bsp/stm32f3discovery/stm32f3discovery.ld
index 58ee95e..0316a34 100755
--- a/hw/bsp/stm32f3discovery/stm32f3discovery.ld
+++ b/hw/bsp/stm32f3discovery/stm32f3discovery.ld
@@ -22,7 +22,7 @@ ENTRY(Reset_Handler)
  * Memory map
  */
 MEMORY {
-FLASH (rx): ORIGIN = 0x08004000, LENGTH = 240K
+FLASH (rx): ORIGIN = 0x08004000, LENGTH = 88K
 CCRAM (rw): ORIGIN = 0x1000, LENGTH = 8K
 SRAM  (rw): ORIGIN = 0x2000, LENGTH = 40K
 }

-- 
To stop receiving notification emails like this one, please contact
ut...@apache.org.


[mynewt-core] branch master updated: Fix boot_serial to follow flash write alignment

2018-03-30 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 2268a67  Fix boot_serial to follow flash write alignment
2268a67 is described below

commit 2268a67a666c0e030335523d5dffd3d647850730
Author: Fabio Utzig 
AuthorDate: Thu Mar 29 16:39:06 2018 -0300

Fix boot_serial to follow flash write alignment

This fixes an issue found on stm32f3 where newtmgr after writing an odd
sized packet, would hardfault on the next write due to trying to write an
odd address which is not valid on stm32f3 flash.

Signed-off-by: Fabio Utzig 
---
 boot/boot_serial/src/boot_serial.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/boot/boot_serial/src/boot_serial.c 
b/boot/boot_serial/src/boot_serial.c
index b888987..60c9694 100644
--- a/boot/boot_serial/src/boot_serial.c
+++ b/boot/boot_serial/src/boot_serial.c
@@ -185,6 +185,7 @@ bs_upload(char *buf, int len)
 uint8_t img_data[512];
 long long int off = UINT_MAX;
 size_t img_blen = 0;
+uint8_t rem_bytes;
 long long int data_len = UINT_MAX;
 size_t slen;
 char name_str[8];
@@ -309,6 +310,12 @@ bs_upload(char *buf, int len)
 rc = 0;
 goto out;
 }
+if (curr_off + img_blen < img_size) {
+rem_bytes = img_blen % flash_area_align(fap);
+if (rem_bytes) {
+img_blen -= rem_bytes;
+}
+}
 rc = flash_area_write(fap, curr_off, img_data, img_blen);
 if (rc == 0) {
 curr_off += img_blen;

-- 
To stop receiving notification emails like this one, please contact
ut...@apache.org.


[GitHub] utzig closed pull request #977: Fix slot0 size in f3disco to avoid writing after end

2018-03-30 Thread GitBox
utzig closed pull request #977: Fix slot0 size in f3disco to avoid writing 
after end
URL: https://github.com/apache/mynewt-core/pull/977
 
 
   

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/hw/bsp/stm32f3discovery/stm32f3discovery.ld 
b/hw/bsp/stm32f3discovery/stm32f3discovery.ld
index 58ee95ec5..0316a347b 100755
--- a/hw/bsp/stm32f3discovery/stm32f3discovery.ld
+++ b/hw/bsp/stm32f3discovery/stm32f3discovery.ld
@@ -22,7 +22,7 @@ ENTRY(Reset_Handler)
  * Memory map
  */
 MEMORY {
-FLASH (rx): ORIGIN = 0x08004000, LENGTH = 240K
+FLASH (rx): ORIGIN = 0x08004000, LENGTH = 88K
 CCRAM (rw): ORIGIN = 0x1000, LENGTH = 8K
 SRAM  (rw): ORIGIN = 0x2000, LENGTH = 40K
 }


 


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: Fix stm32f3 uart overrun handling

2018-03-30 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 14d8ce3  Fix stm32f3 uart overrun handling
14d8ce3 is described below

commit 14d8ce30562e4dc2cc13d4ce732ec9a2b9b5c0f1
Author: Fabio Utzig 
AuthorDate: Thu Mar 29 16:26:11 2018 -0300

Fix stm32f3 uart overrun handling

When an overrun happened it would never leave the overrun state and it
would basically halt from receiving packets.

Signed-off-by: Fabio Utzig 
---
 hw/mcu/stm/stm32f3xx/src/hal_uart.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/mcu/stm/stm32f3xx/src/hal_uart.c 
b/hw/mcu/stm/stm32f3xx/src/hal_uart.c
index ebd89f0..2d1f3c5 100644
--- a/hw/mcu/stm/stm32f3xx/src/hal_uart.c
+++ b/hw/mcu/stm/stm32f3xx/src/hal_uart.c
@@ -114,6 +114,9 @@ uart_irq_handler(int num)
 }
 regs->CR1 = cr1;
 }
+if (isr & USART_ISR_ORE) {
+regs->ICR |= USART_ICR_ORECF;
+}
 }
 
 void

-- 
To stop receiving notification emails like this one, please contact
ut...@apache.org.


[GitHub] utzig closed pull request #975: Fix stm32f3 uart overrun handling

2018-03-30 Thread GitBox
utzig closed pull request #975: Fix stm32f3 uart overrun handling
URL: https://github.com/apache/mynewt-core/pull/975
 
 
   

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/hw/mcu/stm/stm32f3xx/src/hal_uart.c 
b/hw/mcu/stm/stm32f3xx/src/hal_uart.c
index ebd89f016..2d1f3c5bc 100644
--- a/hw/mcu/stm/stm32f3xx/src/hal_uart.c
+++ b/hw/mcu/stm/stm32f3xx/src/hal_uart.c
@@ -114,6 +114,9 @@ uart_irq_handler(int num)
 }
 regs->CR1 = cr1;
 }
+if (isr & USART_ISR_ORE) {
+regs->ICR |= USART_ICR_ORECF;
+}
 }
 
 void


 


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