NHAL Interface
v0.5.0
Hardware Abstraction Layer Interface for Embedded Systems
Loading...
Searching...
No Matches
include
nhal_pin_types.h
Go to the documentation of this file.
1
8
#ifndef NHAL_PIN_TYPES_H
9
#define NHAL_PIN_TYPES_H
10
11
#include <stdint.h>
12
13
#include "
nhal_common.h
"
14
15
typedef
enum
nhal_pin_state_t
{
16
NHAL_PIN_LOW
= 0,
17
NHAL_PIN_HIGH
18
}
nhal_pin_state_t
;
19
20
typedef
enum
{
21
NHAL_PIN_DIR_INPUT
,
22
NHAL_PIN_DIR_OUTPUT
,
23
NHAL_PIN_DIR_TOTAL_NUM
,
24
}
nhal_pin_dir_t
;
25
26
typedef
enum
{
27
NHAL_PIN_PMODE_NONE
,
28
NHAL_PIN_PMODE_PULL_UP
,
29
NHAL_PIN_PMODE_PULL_DOWN
,
30
NHAL_PIN_PMODE_PULL_UP_AND_DOWN
,
31
NHAL_PIN_PMODE_TOTAL_NUM
,
32
}
nhal_pin_pull_mode_t
;
33
34
typedef
void (*
nhal_pin_callback_t
)(
void
*context);
35
36
struct
nhal_pin_config
{
37
nhal_pin_dir_t
direction
;
38
nhal_pin_pull_mode_t
pull_mode
;
39
struct
nhal_pin_impl_config *
impl_config
;
40
};
41
55
struct
nhal_pin_context
{
56
struct
nhal_pin_id *
pin_id
;
57
struct
nhal_pin_impl_ctx *
impl_ctx
;
58
};
59
60
61
#endif
nhal_common.h
nhal_pin_pull_mode_t
nhal_pin_pull_mode_t
Definition
nhal_pin_types.h:26
NHAL_PIN_PMODE_PULL_DOWN
@ NHAL_PIN_PMODE_PULL_DOWN
Definition
nhal_pin_types.h:29
NHAL_PIN_PMODE_PULL_UP
@ NHAL_PIN_PMODE_PULL_UP
Definition
nhal_pin_types.h:28
NHAL_PIN_PMODE_NONE
@ NHAL_PIN_PMODE_NONE
Definition
nhal_pin_types.h:27
NHAL_PIN_PMODE_TOTAL_NUM
@ NHAL_PIN_PMODE_TOTAL_NUM
Definition
nhal_pin_types.h:31
NHAL_PIN_PMODE_PULL_UP_AND_DOWN
@ NHAL_PIN_PMODE_PULL_UP_AND_DOWN
Definition
nhal_pin_types.h:30
nhal_pin_callback_t
void(* nhal_pin_callback_t)(void *context)
Definition
nhal_pin_types.h:34
nhal_pin_dir_t
nhal_pin_dir_t
Definition
nhal_pin_types.h:20
NHAL_PIN_DIR_TOTAL_NUM
@ NHAL_PIN_DIR_TOTAL_NUM
Definition
nhal_pin_types.h:23
NHAL_PIN_DIR_INPUT
@ NHAL_PIN_DIR_INPUT
Definition
nhal_pin_types.h:21
NHAL_PIN_DIR_OUTPUT
@ NHAL_PIN_DIR_OUTPUT
Definition
nhal_pin_types.h:22
nhal_pin_state_t
nhal_pin_state_t
Definition
nhal_pin_types.h:15
NHAL_PIN_LOW
@ NHAL_PIN_LOW
Definition
nhal_pin_types.h:16
NHAL_PIN_HIGH
@ NHAL_PIN_HIGH
Definition
nhal_pin_types.h:17
nhal_pin_config
Definition
nhal_pin_types.h:36
nhal_pin_config::impl_config
struct nhal_pin_impl_config * impl_config
Definition
nhal_pin_types.h:39
nhal_pin_config::pull_mode
nhal_pin_pull_mode_t pull_mode
Definition
nhal_pin_types.h:38
nhal_pin_config::direction
nhal_pin_dir_t direction
Definition
nhal_pin_types.h:37
nhal_pin_context
Pin context structure.
Definition
nhal_pin_types.h:55
nhal_pin_context::pin_id
struct nhal_pin_id * pin_id
Definition
nhal_pin_types.h:56
nhal_pin_context::impl_ctx
struct nhal_pin_impl_ctx * impl_ctx
Definition
nhal_pin_types.h:57
Generated by
1.9.8