no-OS
chibios_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef CHIBIOS_GPIO_H_
34 #define CHIBIOS_GPIO_H_
35 
36 #include <stdint.h>
37 #include "no_os_gpio.h"
38 #include "hal.h"
39 
46  ioportid_t port;
48  iopadid_t pad;
50  iomode_t mode;
51 };
52 
59  ioportid_t port;
61  iopadid_t pad;
63  iomode_t mode;
64 };
65 
69 extern const struct no_os_gpio_platform_ops chibios_gpio_ops;
70 
71 #endif
no_os_gpio_desc::extra
void * extra
Definition: no_os_gpio.h:106
chibios_gpio_init_param::mode
iomode_t mode
Definition: chibios_gpio.h:50
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
NO_OS_GPIO_OUT
#define NO_OS_GPIO_OUT
Definition: no_os_gpio.h:47
chibios_gpio_set_value
int32_t chibios_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: chibios_gpio.c:233
chibios_gpio_desc::pad
iopadid_t pad
Definition: chibios_gpio.h:61
no_os_delay.h
Header file of Delay functions.
chibios_gpio_init_param::port
ioportid_t port
Definition: chibios_gpio.h:46
no_os_time
Structure holding time data (seconds, microseconds).
Definition: no_os_delay.h:47
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:54
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:69
NO_OS_GPIO_IN
#define NO_OS_GPIO_IN
Definition: no_os_gpio.h:48
chibios_gpio_init_param
Structure holding the initialization parameters for chibios os.
Definition: chibios_gpio.h:44
chibios_gpio_direction_output
int32_t chibios_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: chibios_gpio.c:182
chibios_gpio_desc::mode
iomode_t mode
Definition: chibios_gpio.h:63
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
chibios_gpio_desc
chibios platform specific gpio descriptor
Definition: chibios_gpio.h:57
chibios_gpio_get_optional
int32_t chibios_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: chibios_gpio.c:124
no_os_gpio_desc::port
int32_t port
Definition: no_os_gpio.h:98
chibios_gpio_ops
const struct no_os_gpio_platform_ops chibios_gpio_ops
chibios platform specific gpio platform ops structure
Definition: chibios_gpio.c:281
chibios_gpio_init_param::pad
iopadid_t pad
Definition: chibios_gpio.h:48
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
chibios_gpio_direction_input
int32_t chibios_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: chibios_gpio.c:155
chibios_gpio_get
int32_t chibios_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO descriptor.
Definition: chibios_gpio.c:81
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: chibios_delay.c:42
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:69
no_os_time::us
unsigned int us
Definition: no_os_delay.h:48
chibios_gpio_get_direction
int32_t chibios_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: chibios_gpio.c:212
chibios_gpio_desc::port
ioportid_t port
Definition: chibios_gpio.h:59
no_os_gpio_desc::pull
enum no_os_gpio_pull_up pull
Definition: no_os_gpio.h:102
NULL
#define NULL
Definition: wrapper.h:64
chibios_gpio_remove
int32_t chibios_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: chibios_gpio.c:140
no_os_time::s
unsigned int s
Definition: no_os_delay.h:48
no_os_gpio_platform_ops
Structure holding gpio function pointers that point to the platform specific function.
Definition: no_os_gpio.h:127
no_os_gpio_init_param::extra
void * extra
Definition: no_os_gpio.h:89
no_os_gpio.h
Header file of GPIO Interface.
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:54
_gpio_init
int32_t _gpio_init(struct no_os_gpio_desc *desc, const struct no_os_gpio_init_param *param)
Prepare the GPIO decriptor.
Definition: xilinx_gpio.c:63
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:129
no_os_get_time
struct no_os_time no_os_get_time(void)
Get current time.
Definition: chibios_delay.c:51
chibios_gpio.h
Header file for chibios gpio specifics.
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:100
errno.h
Error macro definition for ARM Compiler.
chibios_gpio_ops
const struct no_os_gpio_platform_ops chibios_gpio_ops
chibios platform specific GPIO platform ops structure
Definition: chibios_gpio.c:281
chibios_gpio_get_value
int32_t chibios_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: chibios_gpio.c:260