GPS Device
Loading...
Searching...
No Matches
io.h
Go to the documentation of this file.
1
25
31
32#ifndef IO_H__
33#define IO_H__
34
35#include "err.h"
36#include "stm32f401re_gpio.h"
37#include "configuration.h"
38
45
53typedef struct {
56
58 char name[CONFIG_IO_MAX_NAME_LEN];
59} IO_CFG_ts;
60
70
72
79
97
112
127
142
158ERR_te io_init_handle(IO_CFG_ts *io_cfg, IO_HANDLE_ts **io_handle_o);
159
173ERR_te io_deinit_handle(IO_HANDLE_ts const *io_handle);
174
185ERR_te io_write(IO_HANDLE_ts *io_handle, PIN_STATUS_te pin_status);
186
198ERR_te io_read(IO_HANDLE_ts const *io_handle, PIN_STATUS_te *pin_status_o);
199
201
202#endif
203
System-wide error code definitions.
PIN_STATUS_te
Represents the logical level of a GPIO pin.
Definition common.h:84
ERR_te
Standard return type used by all public API functions.
Definition err.h:35
ERR_te io_init_handle(IO_CFG_ts *io_cfg, IO_HANDLE_ts **io_handle_o)
Initializes and registers an IO handle.
Definition io.c:229
ERR_te io_write(IO_HANDLE_ts *io_handle, PIN_STATUS_te pin_status)
Writes a logic level to an IO pin.
Definition io.c:323
ERR_te io_stop_subsys(void)
Stops the IO subsystem.
Definition io.c:205
ERR_te io_deinit_subsys(void)
Deinitializes the IO subsystem.
Definition io.c:156
ERR_te io_deinit_handle(IO_HANDLE_ts const *io_handle)
Deinitializes an IO handle.
Definition io.c:270
ERR_te io_start_subsys(void)
Starts the IO subsystem.
Definition io.c:181
ERR_te io_read(IO_HANDLE_ts const *io_handle, PIN_STATUS_te *pin_status_o)
Reads the current logic level of an IO pin.
Definition io.c:345
ERR_te io_init_subsys(void)
Initializes the IO subsystem.
Definition io.c:120
struct io_handle_s IO_HANDLE_ts
Opaque handle representing an IO instance.
Definition io.h:69
STM32F401RE GPIO driver public API.
Configuration structure for initializing a GPIO pin.
Configuration structure for initializing an IO handle.
Definition io.h:53
char name[CONFIG_IO_MAX_NAME_LEN]
Definition io.h:58
GPIO_CFG_ts * gpio_handle
Definition io.h:55
Internal structure representing a single IO instance.
Definition io.c:29