12#ifndef ZEPHYR_INCLUDE_DRIVERS_PINMUX_H_
13#define ZEPHYR_INCLUDE_DRIVERS_PINMUX_H_
29#define PINMUX_FUNC_A 0
30#define PINMUX_FUNC_B 1
31#define PINMUX_FUNC_C 2
32#define PINMUX_FUNC_D 3
33#define PINMUX_FUNC_E 4
34#define PINMUX_FUNC_F 5
35#define PINMUX_FUNC_G 6
36#define PINMUX_FUNC_H 7
37#define PINMUX_FUNC_I 8
38#define PINMUX_FUNC_J 9
39#define PINMUX_FUNC_K 10
40#define PINMUX_FUNC_L 11
41#define PINMUX_FUNC_M 12
42#define PINMUX_FUNC_N 13
43#define PINMUX_FUNC_O 14
44#define PINMUX_FUNC_P 15
45#define PINMUX_FUNC_Q 16
46#define PINMUX_FUNC_R 17
47#define PINMUX_FUNC_S 18
48#define PINMUX_FUNC_T 19
50#define PINMUX_PULLUP_ENABLE (0x1)
51#define PINMUX_PULLUP_DISABLE (0x0)
53#define PINMUX_INPUT_ENABLED (0x1)
54#define PINMUX_OUTPUT_ENABLED (0x0)
97 return api->
set(dev, pin, func);
106 return api->
get(dev, pin, func);
115 return api->
pullup(dev, pin, func);
125 return api->
input(dev, pin, func);
static int pinmux_pin_input_enable(const struct device *dev, uint32_t pin, uint8_t func)
Definition: pinmux.h:118
int(* pmux_set)(const struct device *dev, uint32_t pin, uint32_t func)
Callback API upon setting a PIN's function See pinmux_pin_set() for argument description.
Definition: pinmux.h:61
int(* pmux_get)(const struct device *dev, uint32_t pin, uint32_t *func)
Callback API upon getting a PIN's function See pinmux_pin_get() for argument description.
Definition: pinmux.h:67
int(* pmux_input)(const struct device *dev, uint32_t pin, uint8_t func)
Callback API upon setting a PIN's input function See pinmux_input() for argument description.
Definition: pinmux.h:81
static int pinmux_pin_get(const struct device *dev, uint32_t pin, uint32_t *func)
Definition: pinmux.h:100
static int pinmux_pin_set(const struct device *dev, uint32_t pin, uint32_t func)
Definition: pinmux.h:91
static int pinmux_pin_pullup(const struct device *dev, uint32_t pin, uint8_t func)
Definition: pinmux.h:109
int(* pmux_pullup)(const struct device *dev, uint32_t pin, uint8_t func)
Callback API upon setting a PIN's pullup See pinmix_pin_pullup() for argument description.
Definition: pinmux.h:74
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
const void * api
Definition: device.h:373
pmux_set set
Definition: pinmux.h:85
pmux_input input
Definition: pinmux.h:88
pmux_get get
Definition: pinmux.h:86
pmux_pullup pullup
Definition: pinmux.h:87