PWM Driver

2017-07-10 Thread Miguel Azevedo
Hi,

I am currently developing a PWM driver for mynewt, more specifically a
driver for nRF52 based hardware.
Therefore I came up with this PWM high level API, which will be
described ahead on this e-mail.
Its source code:
https://github.com/mlaz/mynewt-core/blob/pwm_dev/hw/drivers/pwm/include/pwm/pwm.h

This API is based in both the current ADC high level API
https://github.com/apache/mynewt-core/blob/master/hw/drivers/adc/include/adc/adc.h
and the abandoned hal_pwm API
https://github.com/apache/mynewt-core/blob/090_dev/hw/hal/include/hal/hal_pwm.h
.
The API itself is roughly the same as hal_pwm exposes, which aligns
with the following concepts:
 -It is assumed that within a system there is a number of discrete PWM
devices which provide a number of channels per device.
 -These devices are configurable, its configuration typically
contemplates all the parameters which affect all the provided channels
(global to the device).
 -A channel is also configurable and its configuration may or may not
affect other channels provided by the same device, depending on the
device's configuration.

I would be glad to have some feedback from the community, in order to
validate this approach.

Regards,

-- 
Miguel Azevedo


duplicate repositories mynewt_arduino_zero, mynewt_nordic, mynewt_stm32f3

2017-07-10 Thread marko kiiskila
Hi,

currently we have these repositories (with almost the same contents),
the new one in github.com/runtimeco  and old one 
in github.com/runtimeinc 

Although from pulling point of view it is somewhat more convenient to users to
have them like this (as the old versions of documentation were point to 
runtimeinc,
new versions point to runtimeco), it is painful to maintain. We’ve already made 
mistakes
when tagging; pull requests were made against old repo etc.

Would anyone object if I remove the old repositories completely? It appears that
you can do git remote set-url to point to new repo, if people have lingering 
links.




Re: Newtmgr moved to new repo

2017-07-10 Thread Paul LaCrosse
Tried option #2, which worked.  Thanks Chris!

On Mon, Jul 10, 2017 at 4:23 PM, Christopher Collins 
wrote:

> Hi Paul,
>
> On Mon, Jul 10, 2017 at 04:13:30PM -0400, Paul LaCrosse wrote:
> > Pauls-MacBook-Pro-2:testgoget paul$  go get mynewt.apache.org/newtmgr/.
> ..
> >
> > # cd /Users/paul/dev/go/src/mynewt.apache.org/newt; git pull --ff-only
> >
> > fatal: repository '
> > https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/' not
> > found
> >
> > package mynewt.apache.org/newtmgr/nmxact/example/ble_loop
> >
> > imports mynewt.apache.org/newt/util/unixchild: exit status 1
> >
> > Download of latest newtmgr, produces error.
>
> It appears your version of the newt repo was cloned from the old apache
> git server (before Mynewt moved to github).  Using "go get" with the
> mynewt.apache.org vanity domain helps to avoid problems like this.  To
> solve this, I would either:
>
> 1. Change the newt repo remote to the github URL:
>
> cd $GOPATH/src/mynewt.apache.org/newt &&
> git remote set-url origin https://github.com/apache/
> incubator-mynewt-newt.git
>
> Or,
>
> 2. Completely remove $GOPATH/src/mynewt.apache.org and reinstall it with
> `go get mynewt.apache.org/newt/...`
>
> Thanks,
> Chris
>


Re: Newtmgr moved to new repo

2017-07-10 Thread Christopher Collins
Hi Paul,

On Mon, Jul 10, 2017 at 04:13:30PM -0400, Paul LaCrosse wrote:
> Pauls-MacBook-Pro-2:testgoget paul$  go get mynewt.apache.org/newtmgr/...
> 
> # cd /Users/paul/dev/go/src/mynewt.apache.org/newt; git pull --ff-only
> 
> fatal: repository '
> https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/' not
> found
> 
> package mynewt.apache.org/newtmgr/nmxact/example/ble_loop
> 
> imports mynewt.apache.org/newt/util/unixchild: exit status 1
> 
> Download of latest newtmgr, produces error.

It appears your version of the newt repo was cloned from the old apache
git server (before Mynewt moved to github).  Using "go get" with the
mynewt.apache.org vanity domain helps to avoid problems like this.  To
solve this, I would either:

1. Change the newt repo remote to the github URL:

cd $GOPATH/src/mynewt.apache.org/newt &&
git remote set-url origin 
https://github.com/apache/incubator-mynewt-newt.git

Or,

2. Completely remove $GOPATH/src/mynewt.apache.org and reinstall it with
`go get mynewt.apache.org/newt/...`

Thanks,
Chris


Re: Newtmgr moved to new repo

2017-07-10 Thread Paul LaCrosse
Pauls-MacBook-Pro-2:testgoget paul$  go get mynewt.apache.org/newtmgr/...

# cd /Users/paul/dev/go/src/mynewt.apache.org/newt; git pull --ff-only

fatal: repository '
https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/' not
found

package mynewt.apache.org/newtmgr/nmxact/example/ble_loop

imports mynewt.apache.org/newt/util/unixchild: exit status 1

Download of latest newtmgr, produces error.


On Mon, Jul 10, 2017 at 1:44 PM, Christopher Collins 
wrote:

> Hello all,
>
> The newtmgr tool location has changed:
>
> From: https://github.com/apache/mynewt-newt/tree/master/newtmgr
>   To: https://github.com/apache/mynewt-newtmgr/tree/master/newtmgr
>
> To download the latest newtmgr, use the following command:
>
> go get mynewt.apache.org/newtmgr/...
>
> The plan is to remove the "old" newtmgr from the newt repo when Mynewt
> 1.1 is released.
>
> The "new" newtmgr has improved BLE support.  BLE should now work more
> reliably on Linux and macOS.  The particulars are documented here:
> http://mynewt.apache.org/latest/newtmgr/command_list/newtmgr_conn/
>
> My preferred way to use BLE is to create a "ble" connection profile with
> an empty connstring:
>
> newtmgr conn add ble type=ble connstring=' '
>
> Then, specify the target device name on the command line each time you
> send a command:
>
> newtmgr -c ble --name nimble-bleprph echo hello
>
> Rationale:
> The reason for the move is to simplify downloading and
> building of newt and newtmgr.  The "go get" command works better with
> the "mynewt.apache.org" vanity domain when there is one application per
> repo.  Since the vanity domain requires the use of the "..." syntax in
> the `go get` command, the entire repo gets downloaded, including
> applications that weren't requested.
>
> Thanks,
> Chris
>


Newtmgr moved to new repo

2017-07-10 Thread Christopher Collins
Hello all,

The newtmgr tool location has changed:

From: https://github.com/apache/mynewt-newt/tree/master/newtmgr
  To: https://github.com/apache/mynewt-newtmgr/tree/master/newtmgr

To download the latest newtmgr, use the following command:

go get mynewt.apache.org/newtmgr/...

The plan is to remove the "old" newtmgr from the newt repo when Mynewt
1.1 is released.

The "new" newtmgr has improved BLE support.  BLE should now work more
reliably on Linux and macOS.  The particulars are documented here:
http://mynewt.apache.org/latest/newtmgr/command_list/newtmgr_conn/

My preferred way to use BLE is to create a "ble" connection profile with
an empty connstring:

newtmgr conn add ble type=ble connstring=' '

Then, specify the target device name on the command line each time you
send a command:

newtmgr -c ble --name nimble-bleprph echo hello

Rationale:
The reason for the move is to simplify downloading and
building of newt and newtmgr.  The "go get" command works better with
the "mynewt.apache.org" vanity domain when there is one application per
repo.  Since the vanity domain requires the use of the "..." syntax in
the `go get` command, the entire repo gets downloaded, including
applications that weren't requested.

Thanks,
Chris