Go to the documentation of this file.
52 #ifndef __GR55xx_HAL_MSIO_H__
53 #define __GR55xx_HAL_MSIO_H__
119 #define MSIO_PIN_0 ((uint16_t)0x0001U)
120 #define MSIO_PIN_1 ((uint16_t)0x0002U)
121 #define MSIO_PIN_2 ((uint16_t)0x0004U)
122 #define MSIO_PIN_3 ((uint16_t)0x0008U)
123 #define MSIO_PIN_4 ((uint16_t)0x0010U)
125 #define MSIO_PIN_ALL ((uint16_t)0x001FU)
127 #define MSIO_PIN_MASK (0x0000001FU)
133 #define MSIO_DIRECTION_NONE LL_MSIO_DIRECTION_NONE
134 #define MSIO_DIRECTION_INPUT LL_MSIO_DIRECTION_INPUT
135 #define MSIO_DIRECTION_OUTPUT LL_MSIO_DIRECTION_OUTPUT
136 #define MSIO_DIRECTION_INOUT LL_MSIO_DIRECTION_INOUT
143 #define MSIO_MODE_ANALOG LL_MSIO_MODE_ANALOG
144 #define MSIO_MODE_DIGITAL LL_MSIO_MODE_DIGITAL
151 #define MSIO_NOPULL LL_MSIO_PULL_NO
152 #define MSIO_PULLUP LL_MSIO_PULL_UP
153 #define MSIO_PULLDOWN LL_MSIO_PULL_DOWN
159 #define MSIO_DEFAULT_CONFIG \
161 .pin = MSIO_PIN_ALL, \
162 .direction = MSIO_DIRECTION_INPUT, \
163 .mode = MSIO_MODE_DIGITAL, \
164 .pull = MSIO_PULLDOWN, \
186 #define IS_MSIO_PIN_ACTION(__ACTION__) (((__ACTION__) == MSIO_PIN_RESET) || ((__ACTION__) == MSIO_PIN_SET))
193 #define IS_MSIO_PIN(__PIN__) ((((__PIN__) & MSIO_PIN_MASK) != 0x00U) && \
194 (((__PIN__) & ~MSIO_PIN_MASK) == 0x00U))
201 #define IS_MSIO_DIRECTION(__DIR__) (((__DIR__) == MSIO_DIRECTION_NONE) || \
202 ((__DIR__) == MSIO_DIRECTION_INPUT) || \
203 ((__DIR__) == MSIO_DIRECTION_OUTPUT) || \
204 ((__DIR__) == MSIO_DIRECTION_INOUT))
211 #define IS_MSIO_MODE(__MODE__) (((__MODE__) == MSIO_MODE_ANALOG) || \
212 ((__MODE__) == MSIO_MODE_DIGITAL))
219 #define IS_MSIO_PULL(__PULL__) (((__PULL__) == MSIO_NOPULL) || \
220 ((__PULL__) == MSIO_PULLUP) || \
221 ((__PULL__) == MSIO_PULLDOWN))
uint32_t direction
Specifies the direction for the selected pins.
@ MSIO_PIN_RESET
MSIO pin low level.
MSIO init structure definition.
Header file containing functions prototypes of MSIO LL library.
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.
struct _msio_init msio_init_t
MSIO init structure definition.
uint32_t mode
Specifies the operating mode for the selected pins.
void hal_msio_init(msio_pad_t MSIOx, msio_init_t *p_msio_init)
Initialize the MSIOx peripheral according to the specified parameters in the msio_init_t.
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.
uint32_t mux
Specifies the Peripheral to be connected to the selected pins.
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.
@ MSIO_PIN_SET
MSIO pin high level.
uint32_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
uint32_t pin
Specifies the MSIO pins to be configured.
This file contains HAL common definitions, enumeration, macros and structures definitions.
Header file containing extended macro of MSIO HAL library.