io.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __IO_H
40 #define __IO_H
41 
42 #ifdef __cplusplus
43  extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48 
68 typedef enum
69 {
73 
74 typedef enum
75 {
76  IO_MODE_INPUT = 0, /* input floating */
77  IO_MODE_OUTPUT, /* output Push Pull */
78  IO_MODE_IT_RISING_EDGE, /* float input - irq detect on rising edge */
79  IO_MODE_IT_FALLING_EDGE, /* float input - irq detect on falling edge */
80  IO_MODE_IT_LOW_LEVEL, /* float input - irq detect on low level */
81  IO_MODE_IT_HIGH_LEVEL, /* float input - irq detect on high level */
82  /* following modes only available on MFX*/
83  IO_MODE_ANALOG, /* analog mode */
84  IO_MODE_OFF, /* when pin isn't used*/
85  IO_MODE_INPUT_PU, /* input with internal pull up resistor */
86  IO_MODE_INPUT_PD, /* input with internal pull down resistor */
87  IO_MODE_OUTPUT_OD, /* Open Drain output without internal resistor */
88  IO_MODE_OUTPUT_OD_PU, /* Open Drain output with internal pullup resistor */
89  IO_MODE_OUTPUT_OD_PD, /* Open Drain output with internal pulldown resistor */
90  IO_MODE_OUTPUT_PP, /* PushPull output without internal resistor */
91  IO_MODE_OUTPUT_PP_PU, /* PushPull output with internal pullup resistor */
92  IO_MODE_OUTPUT_PP_PD, /* PushPull output with internal pulldown resistor */
93  IO_MODE_IT_RISING_EDGE_PU, /* push up resistor input - irq on rising edge */
94  IO_MODE_IT_RISING_EDGE_PD, /* push dw resistor input - irq on rising edge */
95  IO_MODE_IT_FALLING_EDGE_PU, /* push up resistor input - irq on falling edge */
96  IO_MODE_IT_FALLING_EDGE_PD, /* push dw resistor input - irq on falling edge */
97  IO_MODE_IT_LOW_LEVEL_PU, /* push up resistor input - irq detect on low level */
98  IO_MODE_IT_LOW_LEVEL_PD, /* push dw resistor input - irq detect on low level */
99  IO_MODE_IT_HIGH_LEVEL_PU, /* push up resistor input - irq detect on high level */
100  IO_MODE_IT_HIGH_LEVEL_PD, /* push dw resistor input - irq detect on high level */
101 
103 
107 typedef struct
108 {
109  void (*Init)(uint16_t);
110  uint16_t (*ReadID)(uint16_t);
111  void (*Reset)(uint16_t);
112 
113  void (*Start)(uint16_t, uint32_t);
114  uint8_t (*Config)(uint16_t, uint32_t, IO_ModeTypedef);
115  void (*WritePin)(uint16_t, uint32_t, uint8_t);
116  uint32_t (*ReadPin)(uint16_t, uint32_t);
117 
118  void (*EnableIT)(uint16_t);
119  void (*DisableIT)(uint16_t);
120  uint32_t (*ITStatus)(uint16_t, uint32_t);
121  void (*ClearIT)(uint16_t, uint32_t);
122 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif /* __IO_H */
149 
150 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Init
napi_value Init(napi_env env, napi_value exports)
Definition: porcupine/demo/c/pvrecorder/node/pv_recorder_napi.c:197
IO_MODE_IT_FALLING_EDGE_PD
@ IO_MODE_IT_FALLING_EDGE_PD
Definition: io.h:96
IO_MODE_IT_LOW_LEVEL
@ IO_MODE_IT_LOW_LEVEL
Definition: io.h:80
IO_MODE_OUTPUT_OD
@ IO_MODE_OUTPUT_OD
Definition: io.h:87
IO_MODE_INPUT_PD
@ IO_MODE_INPUT_PD
Definition: io.h:86
IO_PinState
IO_PinState
IO Bit SET and Bit RESET enumeration.
Definition: io.h:68
IO_MODE_OUTPUT_PP_PD
@ IO_MODE_OUTPUT_PP_PD
Definition: io.h:92
IO_MODE_INPUT
@ IO_MODE_INPUT
Definition: io.h:76
IO_MODE_ANALOG
@ IO_MODE_ANALOG
Definition: io.h:83
IO_MODE_IT_LOW_LEVEL_PD
@ IO_MODE_IT_LOW_LEVEL_PD
Definition: io.h:98
IO_ModeTypedef
IO_ModeTypedef
Definition: io.h:74
IO_MODE_IT_HIGH_LEVEL_PU
@ IO_MODE_IT_HIGH_LEVEL_PU
Definition: io.h:99
IO_MODE_IT_HIGH_LEVEL_PD
@ IO_MODE_IT_HIGH_LEVEL_PD
Definition: io.h:100
IO_MODE_IT_FALLING_EDGE_PU
@ IO_MODE_IT_FALLING_EDGE_PU
Definition: io.h:95
IO_MODE_OUTPUT_PP
@ IO_MODE_OUTPUT_PP
Definition: io.h:90
IO_MODE_IT_HIGH_LEVEL
@ IO_MODE_IT_HIGH_LEVEL
Definition: io.h:81
IO_MODE_IT_RISING_EDGE_PD
@ IO_MODE_IT_RISING_EDGE_PD
Definition: io.h:94
IO_MODE_IT_RISING_EDGE
@ IO_MODE_IT_RISING_EDGE
Definition: io.h:78
IO_MODE_OUTPUT_OD_PD
@ IO_MODE_OUTPUT_OD_PD
Definition: io.h:89
IO_PIN_RESET
@ IO_PIN_RESET
Definition: io.h:70
IO_MODE_INPUT_PU
@ IO_MODE_INPUT_PU
Definition: io.h:85
IO_MODE_IT_LOW_LEVEL_PU
@ IO_MODE_IT_LOW_LEVEL_PU
Definition: io.h:97
IO_PIN_SET
@ IO_PIN_SET
Definition: io.h:71
IO_DrvTypeDef
Definition: io.h:107
IO_MODE_IT_FALLING_EDGE
@ IO_MODE_IT_FALLING_EDGE
Definition: io.h:79
IO_MODE_OUTPUT_OD_PU
@ IO_MODE_OUTPUT_OD_PU
Definition: io.h:88
IO_MODE_IT_RISING_EDGE_PU
@ IO_MODE_IT_RISING_EDGE_PU
Definition: io.h:93
IO_MODE_OUTPUT_PP_PU
@ IO_MODE_OUTPUT_PP_PU
Definition: io.h:91
IO_MODE_OFF
@ IO_MODE_OFF
Definition: io.h:84
IO_MODE_OUTPUT
@ IO_MODE_OUTPUT
Definition: io.h:77
ITStatus
enum FlagStatus ITStatus


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:56