zephyr/drivers/pinmux/dev/pinmux_dev_stm32.c
Kumar Gala ccad5bf3e3 drivers: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08f51e2bfd475f6245771c1bd2df7ffc744c48c4
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 10:06:48 -05:00

82 lines
1.4 KiB
C

/*
* Copyright (c) 2016 Open-RnD Sp. z o.o.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief
*
* A common driver for STM32 pinmux. Each SoC must implement a SoC
* specific part of the driver.
*/
#include <errno.h>
#include <kernel.h>
#include <device.h>
#include <soc.h>
#include "pinmux.h"
#include <pinmux.h>
#include <pinmux/stm32/pinmux_stm32.h>
static int pinmux_stm32_set(struct device *dev,
u32_t pin, u32_t func)
{
ARG_UNUSED(dev);
return _pinmux_stm32_set(pin, func, NULL);
}
static int pinmux_stm32_get(struct device *dev,
u32_t pin, u32_t *func)
{
ARG_UNUSED(dev);
ARG_UNUSED(pin);
ARG_UNUSED(func);
return -ENOTSUP;
}
static int pinmux_stm32_input(struct device *dev,
u32_t pin,
u8_t func)
{
ARG_UNUSED(dev);
ARG_UNUSED(pin);
ARG_UNUSED(func);
return -ENOTSUP;
}
static int pinmux_stm32_pullup(struct device *dev,
u32_t pin,
u8_t func)
{
ARG_UNUSED(dev);
ARG_UNUSED(pin);
ARG_UNUSED(func);
return -ENOTSUP;
}
static const struct pinmux_driver_api pinmux_stm32_api = {
.set = pinmux_stm32_set,
.get = pinmux_stm32_get,
.pullup = pinmux_stm32_pullup,
.input = pinmux_stm32_input,
};
static int pinmux_stm32_init(struct device *port)
{
ARG_UNUSED(port);
return 0;
}
DEVICE_AND_API_INIT(pmux_dev, CONFIG_PINMUX_DEV_NAME, &pinmux_stm32_init,
NULL, NULL,
PRE_KERNEL_1,
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY,
&pinmux_stm32_api);