gr55xx_ll_msio.h File Reference

Header file containing functions prototypes of MSIO LL library. More...

#include "gr55xx.h"

Go to the source code of this file.

Classes

struct  _ll_msio_init
 LL MSIO init Structure definition. More...
 

Macros

#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_ALL   ((uint32_t)0x1FU)
 
#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)0x0U)
 
#define LL_MSIO_MODE_DIGITAL   ((uint32_t)0x1U)
 
#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_MUX_0   ((uint32_t)0x0U)
 
#define LL_MSIO_MUX_1   ((uint32_t)0x1U)
 
#define LL_MSIO_MUX_2   ((uint32_t)0x2U)
 
#define LL_MSIO_MUX_3   ((uint32_t)0x3U)
 
#define LL_MSIO_MUX_4   ((uint32_t)0x4U)
 
#define LL_MSIO_MUX_5   ((uint32_t)0x5U)
 
#define LL_MSIO_MUX_6   ((uint32_t)0x6U)
 
#define LL_MSIO_MUX_7   ((uint32_t)0x7U)
 
#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 configuartion. More...
 

Typedefs

typedef struct _ll_msio_init ll_msio_init_t
 LL MSIO init Structure definition. More...
 

Enumerations

enum  msio_pad_t { MSIOA = 0x00 }
 MSIO pad Enumerations definition. More...
 

Functions

__STATIC_INLINE void ll_msio_set_pin_direction (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 (uint32_t pin)
 Return gpio direction for a MSIO pin. More...
 
__STATIC_INLINE void ll_msio_set_pin_mode (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 (uint32_t pin)
 Return gpio mode for a MSIO pin. More...
 
__STATIC_INLINE void ll_msio_set_pin_pull (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 (uint32_t pin)
 Return gpio pull-up or pull-down for a dedicated MSIO pin. More...
 
__STATIC_INLINE void ll_msio_set_pin_mux (uint32_t pin, uint32_t mux)
 Configure gpio pinmux number of a dedicated pin from 0 to 4 for a dedicated port. More...
 
__STATIC_INLINE uint32_t ll_msio_get_pin_mux (uint32_t pin)
 Return gpio alternate function of a dedicated pin from 0 to 4 for a dedicated port. More...
 
__STATIC_INLINE uint32_t ll_msio_read_input_port (void)
 Return full input data register value of MSIO. More...
 
__STATIC_INLINE uint32_t ll_msio_is_input_pin_set (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 (uint32_t port_value)
 Write output data register of MSIO. More...
 
__STATIC_INLINE uint32_t ll_msio_read_output_port (void)
 Return full output data register value of MSIO. More...
 
__STATIC_INLINE uint32_t ll_msio_is_output_pin_set (uint32_t pin_mask)
 Return if input data level of several MSIO pins is high or low. More...
 
__STATIC_INLINE void ll_msio_set_output_pin (uint32_t pin_mask)
 Set specified MSIO pins to high level. More...
 
__STATIC_INLINE void ll_msio_reset_output_pin (uint32_t pin_mask)
 Set specified MSIO pins to low level. More...
 
__STATIC_INLINE void ll_msio_toggle_pin (uint32_t pin_mask)
 Toggle data value of specified MSIO pins. More...
 
error_status_t ll_msio_deinit (void)
 De-initialize MSIO registers (Registers restored to their default values). More...
 
error_status_t ll_msio_init (ll_msio_init_t *p_msio_init)
 Initialize MSIO registers according to the specified. parameters in p_msio_init. More...
 
void ll_msio_struct_init (ll_msio_init_t *p_msio_init)
 Set each field of a ll_msio_init_t type structure to default value. More...
 

Detailed Description

Header file containing functions prototypes of MSIO LL library.

Author
BLE Driver Team
Attention
#####Copyright (c) 2019 GOODIX All rights reserved.

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 gr55xx_ll_msio.h.