Header file containing functions prototypes of MSIO LL library. More...
#include "gr5405.h"
Go to the source code of this file.
Classes | |
struct | ll_msio_init_t |
LL MSIO init Structure definition. More... | |
Macros | |
#define | LL_MSIO_INPUT_POS ((uint32_t)0x0U) |
#define | LL_MSIO_OUTPUT_POS ((uint32_t)0x1U) |
#define | LL_MSIO_STRENGTH_DS0_MASK ((uint32_t)0x10U) |
#define | LL_MSIO_STRENGTH_DS1_MASK ((uint32_t)0x01U) |
#define | LL_MSIO_STRENGTH_DS0_POS ((uint32_t)0x04U) |
#define | LL_MSIO_STRENGTH_DS1_POS ((uint32_t)0x00U) |
#define | LL_MSIO_PIN_0 ((uint32_t)0x01U) |
#define | LL_MSIO_PIN_1 ((uint32_t)0x02U) |
#define | LL_MSIO_PIN_2 ((uint32_t)0x04U) |
#define | LL_MSIO_PIN_3 ((uint32_t)0x08U) |
#define | LL_MSIO_PIN_4 ((uint32_t)0x10U) |
#define | LL_MSIO_PIN_5 ((uint32_t)0x20U) |
#define | LL_MSIO_PIN_6 ((uint32_t)0x40U) |
#define | LL_MSIO_PIN_7 ((uint32_t)0x80U) |
#define | LL_MSIO_PIN_8 ((uint32_t)0x100U) |
#define | LL_MSIO_PIN_9 ((uint32_t)0x200U) |
#define | LL_MSIO_PIN_ALL ((uint32_t)0x3FFU) |
#define | LL_MSIO_DIRECTION_NONE ((uint32_t)0x0U) |
#define | LL_MSIO_DIRECTION_INPUT ((uint32_t)0x1U) |
#define | LL_MSIO_DIRECTION_OUTPUT ((uint32_t)0x2U) |
#define | LL_MSIO_DIRECTION_INOUT ((uint32_t)0x3U) |
#define | LL_MSIO_MODE_ANALOG ((uint32_t)0x1U) |
#define | LL_MSIO_MODE_DIGITAL ((uint32_t)0x0U) |
#define | LL_MSIO_PULL_NO ((uint32_t)0x0U) |
#define | LL_MSIO_PULL_UP ((uint32_t)0x1U) |
#define | LL_MSIO_PULL_DOWN ((uint32_t)0x2U) |
#define | LL_MSIO_SPEED_MEDIUM ((uint32_t)0x1U) |
#define | LL_MSIO_SPEED_HIGH ((uint32_t)0x0U) |
#define | LL_MSIO_STRENGTH_LOW ((uint32_t)0x00U) |
#define | LL_MSIO_STRENGTH_MEDIUM ((uint32_t)0x01U) |
#define | LL_MSIO_STRENGTH_HIGH ((uint32_t)0x10U) |
#define | LL_MSIO_STRENGTH_ULTRA ((uint32_t)0x11U) |
#define | LL_MSIO_INPUT_TYPE_CMOS ((uint32_t)0x00U) |
#define | LL_MSIO_INPUT_TYPE_SCHMITT ((uint32_t)0x01U) |
#define | LL_MSIO_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG(__instance__->__REG__, (__VALUE__)) |
Write a value in MSIO register. More... | |
#define | LL_MSIO_ReadReg(__instance__, __REG__) READ_REG(__instance__->__REG__) |
Read a value in MSIO register. More... | |
#define | LL_MSIO_DEFAULT_CONFIG |
LL MSIO InitStrcut default configuration. More... | |
Enumerations | |
enum | msio_pad_t { MSIOA = 0x00 } |
MSIO pad Enumerations definition. More... | |
Functions | |
__STATIC_INLINE void | ll_msio_set_pin_direction (msio_pad_t MSIOx, uint32_t pin_mask, uint32_t direction) |
Set several MSIO pins to input/output direction. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_direction (msio_pad_t MSIOx, uint32_t pin) |
Return gpio direction for a MSIO pin. More... | |
__STATIC_INLINE void | ll_msio_set_pin_mode (msio_pad_t MSIOx, uint32_t pin_mask, uint32_t mode) |
Set several MSIO pins to analog/digital mode. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_mode (msio_pad_t MSIOx, uint32_t pin) |
Return gpio mode for a MSIO pin. More... | |
__STATIC_INLINE void | ll_msio_set_pin_input_type (msio_pad_t MSIOx, uint32_t pin_mask, uint32_t type) |
Set several MSIO pins input type. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_input_type (msio_pad_t MSIOx, uint32_t pin) |
Return input type for a MSIO pin. More... | |
__STATIC_INLINE void | ll_msio_set_pin_pull (msio_pad_t MSIOx, uint32_t pin_mask, uint32_t pull) |
Configure gpio pull-up or pull-down for a dedicated MSIO pin. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_pull (msio_pad_t MSIOx, uint32_t pin) |
Return gpio pull-up or pull-down for a dedicated MSIO pin. More... | |
__STATIC_INLINE void | ll_msio_set_pin_mux (msio_pad_t MSIOx, uint32_t pin, uint32_t mux) |
Configure gpio pinmux number of a dedicated pin from 0 to 9 for a dedicated port. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_mux (msio_pad_t MSIOx, uint32_t pin) |
Return gpio alternate function of a dedicated pin from 0 to 9 for a dedicated port. More... | |
__STATIC_INLINE void | ll_msio_set_pin_speed (msio_pad_t MSIOx, uint32_t pin_mask, uint32_t speed) |
Configure gpio pinmux number of a dedicated pin from 0 to 9 for a dedicated port. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_speed (msio_pad_t MSIOx, uint32_t pin) |
Return gpio alternate function of a dedicated pin from 0 to 9 for a dedicated port. More... | |
__STATIC_INLINE void | ll_msio_set_pin_strength (msio_pad_t MSIOx, uint32_t pin_mask, uint32_t strength) |
Configure gpio pinmux number of a dedicated pin from 0 to 9 for a dedicated port. More... | |
__STATIC_INLINE uint32_t | ll_msio_get_pin_strength (msio_pad_t MSIOx, uint32_t pin_mask) |
Return gpio alternate function of a dedicated pin from 0 to 9 for a dedicated port. More... | |
__STATIC_INLINE uint32_t | ll_msio_read_input_port (msio_pad_t MSIOx) |
Return full input data register value of MSIO. More... | |
__STATIC_INLINE uint32_t | ll_msio_read_input_pin (msio_pad_t MSIOx, uint32_t pin_mask) |
Return if input data level of several MSIO pins is high or low. More... | |
__STATIC_INLINE uint32_t | ll_msio_read_output_pin (msio_pad_t MSIOx, uint32_t pin_mask) |
Return if input data level of several MSIO pins is high or low. More... | |
__STATIC_INLINE void | ll_msio_write_output_port (msio_pad_t MSIOx, uint32_t port_value) |
Write output data register of MSIO. More... | |
__STATIC_INLINE uint32_t | ll_msio_read_output_port (msio_pad_t MSIOx) |
Return full output data register value of MSIO. More... | |
__STATIC_INLINE void | ll_msio_set_output_pin (msio_pad_t MSIOx, uint32_t pin_mask) |
Set specified MSIO pins to high level. More... | |
__STATIC_INLINE void | ll_msio_reset_output_pin (msio_pad_t MSIOx, uint32_t pin_mask) |
Set specified MSIO pins to low level. More... | |
__STATIC_INLINE void | ll_msio_toggle_pin (msio_pad_t MSIOx, uint32_t pin_mask) |
Toggle data value of specified MSIO pins. More... | |
void | ll_msio_init (msio_pad_t MSIOx, const ll_msio_init_t *p_msio_init) |
Initialize MSIO registers according to the specified. parameters in p_msio_init. More... | |
Header file containing functions prototypes of MSIO LL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file ll_msio.h.