mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 01:11:10 +03:00
upm-c: remove uint8_t limit from pin/bus variables in structs
This removes unnecessary uint8 types from C driver structs that prevented some sensors from being initialized when connected to a MRAA subplatform. Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
@ -41,10 +41,8 @@ mq303a_context mq303a_init(int pin, int heater_pin) {
|
||||
if (!dev)
|
||||
return NULL;
|
||||
|
||||
dev->aio_pin = pin;
|
||||
dev->gpio_pin = heater_pin;
|
||||
dev->aio = mraa_aio_init(dev->aio_pin);
|
||||
dev->gpio = mraa_gpio_init(dev->gpio_pin);
|
||||
dev->aio = mraa_aio_init(pin);
|
||||
dev->gpio = mraa_gpio_init(heater_pin);
|
||||
|
||||
if(mraa_gpio_dir(dev->gpio, MRAA_GPIO_OUT) != MRAA_SUCCESS)
|
||||
{
|
||||
|
@ -43,8 +43,6 @@
|
||||
typedef struct _mq303a_context {
|
||||
mraa_gpio_context gpio;
|
||||
mraa_aio_context aio;
|
||||
uint8_t gpio_pin;
|
||||
uint8_t aio_pin;
|
||||
} *mq303a_context;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user