Skip to content
Snippets Groups Projects
Commit b3ebdab8 authored by Vincent Dupont's avatar Vincent Dupont Committed by GitHub
Browse files

Merge pull request #7723 from haukepetersen/fix_saulreg_devptr

saul_reg: make ptr to device descriptor non const
parents 6404bb75 41f0864b
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ void auto_init_gpio(void) ...@@ -55,7 +55,7 @@ void auto_init_gpio(void)
LOG_DEBUG("[auto_init_saul] initializing GPIO #%u\n", i); LOG_DEBUG("[auto_init_saul] initializing GPIO #%u\n", i);
saul_reg_entries[i].dev = p; saul_reg_entries[i].dev = (void *)p;
saul_reg_entries[i].name = p->name; saul_reg_entries[i].name = p->name;
if ((p->mode == GPIO_IN) || (p->mode == GPIO_IN_PD) || if ((p->mode == GPIO_IN) || (p->mode == GPIO_IN_PD) ||
(p->mode == GPIO_IN_PU)) { (p->mode == GPIO_IN_PU)) {
......
...@@ -38,7 +38,7 @@ extern "C" { ...@@ -38,7 +38,7 @@ extern "C" {
*/ */
typedef struct saul_reg { typedef struct saul_reg {
struct saul_reg *next; /**< pointer to the next device */ struct saul_reg *next; /**< pointer to the next device */
const void *dev; /**< pointer to the device descriptor */ void *dev; /**< pointer to the device descriptor */
const char *name; /**< string identifier for the device */ const char *name; /**< string identifier for the device */
saul_driver_t const *driver; /**< the devices read callback */ saul_driver_t const *driver; /**< the devices read callback */
} saul_reg_t; } saul_reg_t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment