Hej,
I see your point. Actually SAUL is (so far) not really intended for
hot-plugging. But what you can easily do, is define the pin(s) you
connect to your actuator at compile time and make them available via the
SAUL registry. To do this in the simplest way, you can just edit the
`boards/samr21-xpro/include/gpio_params.h` file and add the pins that
you need control over, maybe like this (if your actuator is connected to
pin PB02):
static const saul_gpio_params_t saul_gpio_params[] =
{
{
.name = "LED(orange)",
.pin = LED_GPIO,
.dir = GPIO_DIR_OUT,
},
{
.name = "My Actuator",
.pin = GPIO_PIN(PB, 2),
.dir = GPIO_DIR_OUT
}
};
And thats it, now your actuator pin should be listed when using the
`saul` shell command.
Cheers,
Hauke
On 20.01.2016 16:07, Ilias Seitanidis wrote:
Dear Hauke,
Thank you for your answer. I executed the default example in my samr21
but unfortunately only the led is supported.
I hoped that there was an abstraction on the rest of the gpios so I
would be able to connect an actuator easily.
Best,
Ilias
2016-01-20 11:45 GMT+01:00 Hauke Petersen <hauke.peter...@fu-berlin.de
<mailto:hauke.peter...@fu-berlin.de>>:
Hi,
depends on what you are looking for. Have a look at the `default`
example for the `iotlab-m3` or the `samr21-xpro`. These are so far
the only boards that have bindings to some sensors/gpios via SAUL.
But as coincidence I am working on some SAUL optimizations and on
SAULifying many more drivers as we speak, expect some PRs to this
topic end of this week...
Hope that gives you some direction, otherwise let us know if you
have more specific questions on SAUL!
Cheers,
Hauke
On 19.01.2016 15:01, Ilias Seitanidis wrote:
Dear all ,
I would like to ask you if there is any example of the drivers/saul .
Thank you in advance!
_______________________________________________
devel mailing list
devel@riot-os.org <mailto:devel@riot-os.org>
https://lists.riot-os.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@riot-os.org <mailto:devel@riot-os.org>
https://lists.riot-os.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel