no-OS
chibios_gpio.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef CHIBIOS_GPIO_H_
40 #define CHIBIOS_GPIO_H_
41 
42 #include <stdint.h>
43 #include "no_os_gpio.h"
44 #include "hal.h"
45 
52  ioportid_t port;
54  iopadid_t pad;
56  iomode_t mode;
57 };
58 
65  ioportid_t port;
67  iopadid_t pad;
69  iomode_t mode;
70 };
71 
75 extern const struct no_os_gpio_platform_ops chibios_gpio_ops;
76 
77 #endif
no_os_gpio_desc::extra
void * extra
Definition: no_os_gpio.h:112
chibios_gpio_init_param::mode
iomode_t mode
Definition: chibios_gpio.h:56
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
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:239
chibios_gpio_desc::pad
iopadid_t pad
Definition: chibios_gpio.h:67
no_os_delay.h
Header file of Delay functions.
chibios_gpio_init_param::port
ioportid_t port
Definition: chibios_gpio.h:52
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
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_GPIO_IN
#define NO_OS_GPIO_IN
Definition: no_os_gpio.h:54
chibios_gpio_init_param
Structure holding the initialization parameters for chibios os.
Definition: chibios_gpio.h:50
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:188
chibios_gpio_desc::mode
iomode_t mode
Definition: chibios_gpio.h:69
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
chibios_gpio_desc
chibios platform specific gpio descriptor
Definition: chibios_gpio.h:63
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:130
no_os_gpio_desc::port
int32_t port
Definition: no_os_gpio.h:104
chibios_gpio_ops
const struct no_os_gpio_platform_ops chibios_gpio_ops
chibios platform specific gpio platform ops structure
Definition: chibios_gpio.c:287
chibios_gpio_init_param::pad
iopadid_t pad
Definition: chibios_gpio.h:54
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
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:161
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:87
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Generate miliseconds delay.
Definition: chibios_delay.c:48
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
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:218
chibios_gpio_desc::port
ioportid_t port
Definition: chibios_gpio.h:65
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
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:146
no_os_time::s
unsigned int s
Definition: no_os_delay.h:54
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_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
_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:69
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
no_os_get_time
struct no_os_time no_os_get_time(void)
Get current time.
Definition: chibios_delay.c:57
chibios_gpio.h
Header file for chibios gpio specifics.
no_os_gpio_desc::number
int32_t number
Definition: no_os_gpio.h:106
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:287
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:266