Go to the documentation of this file.
124 #define MSIO_PIN_0 ((uint16_t)0x0001U)
125 #define MSIO_PIN_1 ((uint16_t)0x0002U)
126 #define MSIO_PIN_2 ((uint16_t)0x0004U)
127 #define MSIO_PIN_3 ((uint16_t)0x0008U)
128 #define MSIO_PIN_4 ((uint16_t)0x0010U)
129 #define MSIO_PIN_5 ((uint16_t)0x0020U)
130 #define MSIO_PIN_6 ((uint16_t)0x0040U)
131 #define MSIO_PIN_7 ((uint16_t)0x0080U)
132 #define MSIO_PIN_6 ((uint16_t)0x0040U)
133 #define MSIO_PIN_7 ((uint16_t)0x0080U)
134 #define MSIO_PIN_8 ((uint16_t)0x0100U)
135 #define MSIO_PIN_9 ((uint16_t)0x0200U)
136 #define MSIO_PIN_ALL ((uint16_t)0x03FFU)
137 #define MSIO_PIN_MASK (0x000003FFU)
144 #define MSIO_DIRECTION_NONE LL_MSIO_DIRECTION_NONE
145 #define MSIO_DIRECTION_INPUT LL_MSIO_DIRECTION_INPUT
146 #define MSIO_DIRECTION_OUTPUT LL_MSIO_DIRECTION_OUTPUT
147 #define MSIO_DIRECTION_INOUT LL_MSIO_DIRECTION_INOUT
157 #define MSIO_MODE_ANALOG LL_MSIO_MODE_ANALOG
158 #define MSIO_MODE_DIGITAL LL_MSIO_MODE_DIGITAL
165 #define MSIO_NOPULL LL_MSIO_PULL_NO
166 #define MSIO_PULLUP LL_MSIO_PULL_UP
167 #define MSIO_PULLDOWN LL_MSIO_PULL_DOWN
174 #define MSIO_SPEED_MEDIUM LL_MSIO_SPEED_MEDIUM
175 #define MSIO_SPEED_HIGH LL_MSIO_SPEED_HIGH
182 #define MSIO_STRENGTH_LOW LL_MSIO_STRENGTH_LOW
183 #define MSIO_STRENGTH_MEDIUM LL_MSIO_STRENGTH_MEDIUM
184 #define MSIO_STRENGTH_HIGH LL_MSIO_STRENGTH_HIGH
185 #define MSIO_STRENGTH_ULTRA LL_MSIO_STRENGTH_ULTRA
192 #define MSIO_INPUT_TYPE_CMOS LL_MSIO_INPUT_TYPE_CMOS
193 #define MSIO_INPUT_TYPE_SCHMITT LL_MSIO_INPUT_TYPE_SCHMITT
199 #define MSIO_DEFAULT_CONFIG \
201 .pin = MSIO_PIN_ALL, \
202 .direction = MSIO_DIRECTION_INPUT, \
203 .mode = MSIO_MODE_DIGITAL, \
204 .pull = MSIO_PULLDOWN, \
205 .speed = MSIO_SPEED_MEDIUM, \
206 .strength = MSIO_STRENGTH_MEDIUM, \
207 .input_type = MSIO_INPUT_TYPE_CMOS, \
208 .mux = IO_MUX_GPIO, \
225 #define __HAL_MSIO_IT_GET_IT(__MSIOX__, __MSIO_PIN__) ll_msio_read_flag_it(__MSIOX__, __MSIO_PIN__)
234 #define __HAL_MSIO_IT_CLEAR_IT(__MSIOX__, __MSIO_PIN__) ll_msio_clear_flag_it(__MSIOX__, __MSIO_PIN__)
249 #define IS_MSIO_PIN_ACTION(__ACTION__) (((__ACTION__) == MSIO_PIN_RESET) || ((__ACTION__) == MSIO_PIN_SET))
256 #define IS_MSIO_PIN(__PIN__) ((((__PIN__) & MSIO_PIN_MASK) != 0x00U) && \
257 (((__PIN__) & ~MSIO_PIN_MASK) == 0x00U))
264 #define IS_MSIO_DIRECTION(__DIR__) (((__DIR__) == MSIO_DIRECTION_NONE) || \
265 ((__DIR__) == MSIO_DIRECTION_INPUT) || \
266 ((__DIR__) == MSIO_DIRECTION_OUTPUT) || \
267 ((__DIR__) == MSIO_DIRECTION_INOUT))
274 #define IS_MSIO_MODE(__MODE__) (((__MODE__) == MSIO_MODE_ANALOG) || \
275 ((__MODE__) == MSIO_MODE_DIGITAL))
282 #define IS_MSIO_PULL(__PULL__) (((__PULL__) == MSIO_NOPULL) || \
283 ((__PULL__) == MSIO_PULLUP) || \
284 ((__PULL__) == MSIO_PULLDOWN))
void hal_msio_init(msio_pad_t MSIOx, const msio_init_t *p_msio_init)
Initialize the MSIOx peripheral according to the specified parameters in the msio_init_t.
HAL_MSIO Callback function definition.
void hal_msio_write_pin(msio_pad_t MSIOx, uint16_t msio_pin, msio_pin_state_t pin_state)
Set or clear the selected data port bit.
void hal_msio_exti_callback(msio_pad_t MSIOx, uint16_t msio_pin)
MSIOB pin detection callback.
ll_msio_init_t msio_init_t
MSIO init structure definition.
Header file containing functions prototypes of MSIO LL library.
LL MSIO init Structure definition.
void hal_msio_deinit(msio_pad_t MSIOx, uint32_t msio_pin)
De-initialize the MSIOx peripheral registers to their default reset values.
msio_pad_t
MSIO pad Enumerations definition.
void hal_msio_toggle_pin(msio_pad_t MSIOx, uint16_t msio_pin)
Toggle the specified MSIO pin.
This file contains HAL common definitions, enumeration, macros and structures definitions.
msio_pin_state_t hal_msio_read_pin(msio_pad_t MSIOx, uint16_t msio_pin)
Read the specified input port pin.
msio_pin_state_t
MSIO Bit SET and Bit RESET enumerations.
struct _hal_msio_callback hal_msio_callback_t
HAL_MSIO Callback function definition.
void(* msio_callback)(msio_pad_t MSIOx, uint16_t msio_pin)
void hal_msio_exti_irq_handler(msio_pad_t MSIOx)
Handle MSIOB interrupt request.