no-OS
maxim_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef MAXIM_GPIO_H_
40 #define MAXIM_GPIO_H_
41 
42 #include <stdbool.h>
43 #include <stdint.h>
44 #include "no_os_irq.h"
45 #include "no_os_gpio.h"
46 #include "max32650.h"
47 #include "gpio.h"
48 
49 #define N_PINS MXC_CFG_GPIO_PINS_PORT
50 #define N_PORTS MXC_CFG_GPIO_INSTANCES
51 
55 extern const struct no_os_gpio_platform_ops max_gpio_ops;
59 extern const struct no_os_irq_platform_ops max_gpio_irq_ops;
60 
63  mxc_gpio_vssel_t vssel;
64 };
65 
66 #endif
NO_OS_PULL_DOWN
@ NO_OS_PULL_DOWN
Definition: no_os_gpio.h:76
no_os_gpio_desc::extra
void * extra
Definition: no_os_gpio.h:112
maxim_gpio.h
Header file for maxim gpio specifics.
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
NO_OS_GPIO_OUT
#define NO_OS_GPIO_OUT
Definition: no_os_gpio.h:53
no_os_gpio_init_param::pull
enum no_os_gpio_pull_up pull
Definition: no_os_gpio.h:91
max_gpio_get_optional
int32_t max_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: maxim_gpio.c:152
no_os_udelay
void no_os_udelay(uint32_t usecs)
Generate microseconds delay.
Definition: maxim_delay.c:60
maxim_irq.h
Header file for maxim irq specifics.
NO_OS_GPIO_HIGH_Z
@ NO_OS_GPIO_HIGH_Z
Definition: no_os_gpio.h:125
N_PORTS
#define N_PORTS
Definition: maxim_gpio.h:50
no_os_irq.h
Header file of IRQ interface.
max_gpio_get
int32_t max_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: maxim_gpio.c:72
maxim_gpio.h
Header file for maxim gpio specifics.
no_os_delay.h
Header file of Delay functions.
max_gpio_direction_input
int32_t max_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: maxim_gpio.c:184
no_os_gpio_init_param::port
int32_t port
Definition: no_os_gpio.h:87
NO_OS_PULL_UP_WEAK
@ NO_OS_PULL_UP_WEAK
Definition: no_os_gpio.h:77
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
no_os_gpio_init_param::number
int32_t number
Definition: no_os_gpio.h:89
NO_OS_PULL_DOWN_WEAK
@ NO_OS_PULL_DOWN_WEAK
Definition: no_os_gpio.h:78
no_os_get_time
struct no_os_time no_os_get_time(void)
Get current time.
Definition: maxim_delay.c:79
no_os_time
Structure holding time data (seconds, microseconds).
Definition: no_os_delay.h:53
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:60
maxim_gpio.h
Header file for maxim gpio specifics.
NO_OS_GPIO_IN
#define NO_OS_GPIO_IN
Definition: no_os_gpio.h:54
NO_OS_PULL_NONE
@ NO_OS_PULL_NONE
Definition: no_os_gpio.h:72
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
maxim_irq.h
Header file for maxim irq specifics.
SysTick_Handler
void SysTick_Handler(void)
Definition: maxim_delay.c:49
maxim_gpio.h
Header file for maxim gpio specifics.
maxim_irq.h
Header file for maxim irq specifics.
max_gpio_get_value
int32_t max_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: maxim_gpio.c:303
maxim_gpio.h
Header file for maxim gpio specifics.
maxim_irq.h
Header file for maxim irq specifics.
maxim_gpio.h
Header file for maxim gpio specifics.
max_gpio_direction_output
int32_t max_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: maxim_gpio.c:206
max_gpio_get_direction
int32_t max_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: maxim_gpio.c:240
no_os_gpio_desc::port
int32_t port
Definition: no_os_gpio.h:104
max_gpio_set_value
int32_t max_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: maxim_gpio.c:266
max_gpio_ops
const struct no_os_gpio_platform_ops max_gpio_ops
maxim platform specific GPIO platform ops structure
Definition: maxim_gpio.c:326
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: maxim_delay.c:70
max_gpio_init_param::vssel
mxc_gpio_vssel_t vssel
Definition: maxim_gpio.h:63
max_gpio_ops
const struct no_os_gpio_platform_ops max_gpio_ops
maxim platform specific gpio platform ops structure
Definition: maxim_gpio.c:326
max_gpio_init_param
GPIO platform specific init parameters.
Definition: maxim_gpio.h:61
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
no_os_time::us
unsigned int us
Definition: no_os_delay.h:54
no_os_gpio_desc::pull
enum no_os_gpio_pull_up pull
Definition: no_os_gpio.h:108
NULL
#define NULL
Definition: wrapper.h:64
maxim_irq.h
Header file for maxim irq specifics.
no_os_time::s
unsigned int s
Definition: no_os_delay.h:54
NO_OS_PULL_UP
@ NO_OS_PULL_UP
Definition: no_os_gpio.h:74
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:133
no_os_gpio_init_param::extra
void * extra
Definition: no_os_gpio.h:95
no_os_gpio.h
Header file of GPIO Interface.
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:166
maxim_irq.h
Header file for maxim irq specifics.
no_os_util.h
Header file of utility functions.
no_os_gpio_platform_ops::gpio_ops_get
int32_t(* gpio_ops_get)(struct no_os_gpio_desc **, const struct no_os_gpio_init_param *)
Definition: no_os_gpio.h:135
N_PINS
#define N_PINS
Definition: maxim_gpio.h:49
maxim_irq.h
Header file for maxim irq specifics.
max_gpio_irq_ops
const struct no_os_irq_platform_ops max_gpio_irq_ops
maxim platform specific gpio irq platform ops structure
Definition: maxim_gpio_irq.c:381
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:106
errno.h
Error macro definition for ARM Compiler.
maxim_gpio.h
Header file for maxim gpio specifics.
max_gpio_remove
int32_t max_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: maxim_gpio.c:168