summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2016-10-02 10:23:26 -0400
committerAnas Nashif <nashif@linux.intel.com>2016-10-07 16:15:07 +0000
commit84c9db39e772db5914d0bbf6cbf21e9733236914 (patch)
tree49db3137939b0982c23f36dcbd721be8412b800d /samples
parent1450f7bae4808a5effcf7db82b38f007b8ffc794 (diff)
gpio: reduce Kconfigs and use consistent name for GPIOs
Using AON for GPIO kconfigs is very specifc to quark se, there is no need to make this special for this platform. Use the existing scheme instead. Change-Id: I946431490380dc0f537d6056277a94c9c9c80fed Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/sensor/bmi160/x86/prj.conf6
-rw-r--r--samples/sensor/bmi160/x86/src/x86_bmi160.c26
2 files changed, 16 insertions, 16 deletions
diff --git a/samples/sensor/bmi160/x86/prj.conf b/samples/sensor/bmi160/x86/prj.conf
index 590a64d37..1cabf9f26 100644
--- a/samples/sensor/bmi160/x86/prj.conf
+++ b/samples/sensor/bmi160/x86/prj.conf
@@ -12,6 +12,6 @@ CONFIG_RING_BUFFER=y
CONFIG_GPIO=y
CONFIG_GPIO_QMSI=y
CONFIG_GPIO_QMSI_0_PRI=2
-CONFIG_GPIO_QMSI_AON=y
-CONFIG_GPIO_QMSI_AON_NAME="GPIO_AON_0"
-CONFIG_GPIO_QMSI_AON_PRI=2
+CONFIG_GPIO_QMSI_1=y
+CONFIG_GPIO_QMSI_1_NAME="GPIO_1"
+CONFIG_GPIO_QMSI_1_PRI=2
diff --git a/samples/sensor/bmi160/x86/src/x86_bmi160.c b/samples/sensor/bmi160/x86/src/x86_bmi160.c
index a6552bcb0..934a045cc 100644
--- a/samples/sensor/bmi160/x86/src/x86_bmi160.c
+++ b/samples/sensor/bmi160/x86/src/x86_bmi160.c
@@ -26,30 +26,30 @@
QUARK_SE_IPM_DEFINE(bmi160_ipm, 0, QUARK_SE_IPM_OUTBOUND);
-#define SLEEPTIME MSEC(1000)
+#define SLEEPTIME MSEC(1000)
-#define BMI160_INTERRUPT_PIN 4
+#define BMI160_INTERRUPT_PIN 4
struct device *ipm;
struct gpio_callback cb;
-static void aon_gpio_callback(struct device *port,
- struct gpio_callback *cb, uint32_t pins)
+static void gpio_callback(struct device *port,
+ struct gpio_callback *cb, uint32_t pins)
{
ipm_send(ipm, 0, 0, NULL, 0);
}
void main(void)
{
- uint32_t timer_data[2] = {0, 0};
- struct device *aon_gpio;
+ uint32_t timer_data[2] = { 0, 0 };
+ struct device *gpio;
struct nano_timer timer;
nano_timer_init(&timer, timer_data);
- aon_gpio = device_get_binding("GPIO_AON_0");
- if (!aon_gpio) {
- printf("aon_gpio device not found.\n");
+ gpio = device_get_binding("GPIO_1");
+ if (!gpio) {
+ printf("gpio device not found.\n");
return;
}
@@ -59,14 +59,14 @@ void main(void)
return;
}
- gpio_init_callback(&cb, aon_gpio_callback, BIT(BMI160_INTERRUPT_PIN));
- gpio_add_callback(aon_gpio, &cb);
+ gpio_init_callback(&cb, gpio_callback, BIT(BMI160_INTERRUPT_PIN));
+ gpio_add_callback(gpio, &cb);
- gpio_pin_configure(aon_gpio, BMI160_INTERRUPT_PIN,
+ gpio_pin_configure(gpio, BMI160_INTERRUPT_PIN,
GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
GPIO_INT_ACTIVE_LOW | GPIO_INT_DEBOUNCE);
- gpio_pin_enable_callback(aon_gpio, BMI160_INTERRUPT_PIN);
+ gpio_pin_enable_callback(gpio, BMI160_INTERRUPT_PIN);
while (1) {
nano_task_timer_start(&timer, SLEEPTIME);