Renesas PTX1xxR IoT-Reader API (non-OS) Version 7.3.1
Renesas Software Stack for IoT-Reader Applications (non-OS)
Data Structures | Macros | Typedefs | Enumerations | Functions
Collaboration diagram for GPIO Operation API:

Data Structures

struct  ptxGPIO_InitParams
 GPIO Initialization Parameters. More...
 
struct  ptxGPIO
 GPIO Component. More...
 

Macros

#define PTX_GPIO_FLAGS_ENABLE_INTERNAL_PULLUP   (uint8_t)0x01
 GPIO Flags.
 
#define PTX_GPIO_FLAGS_ENABLE_HIGH_DRIVER_STRENGTH   (uint8_t)0x02
 

Typedefs

typedef struct ptxGPIO_InitParams ptxGPIO_InitParams_t
 GPIO Initialization Parameters.
 
typedef enum ptxGPIO_Pin ptxGPIO_Pin_t
 Supported GPIO-pins.
 
typedef enum ptxGPIO_Flags ptxGPIO_Flags_t
 Supported GPIO-Flags.
 
typedef enum ptxGPIO_Config ptxGPIO_Config_t
 GPIO Config.
 
typedef struct ptxGPIO ptxGPIO_t
 GPIO Component.
 

Enumerations

enum  ptxGPIO_Pin {
  GPIO_Pin_5 = 5 , GPIO_Pin_6 = 6 , GPIO_Pin_7 = 7 , GPIO_Pin_8 = 8 ,
  GPIO_Pin_9 = 9 , GPIO_Pin_10 = 10 , GPIO_Pin_11 = 11 , GPIO_Pin_12 = 12
}
 Supported GPIO-pins.
 
enum  ptxGPIO_Flags { GPIO_Flags_None , GPIO_Flags_In_Enable_Internal_Pullup , GPIO_Flags_Out_Enable_High_Driver_Strength }
 Supported GPIO-Flags.
 
enum  ptxGPIO_Config { GPIO_Config_Input , GPIO_Config_Output }
 GPIO Config.
 

Functions

ptxStatus_t ptxGPIO_Init (ptxGPIO_t *gpioComp, ptxGPIO_InitParams_t *initParams)
 Initializes the GPIO Component.
 
ptxStatus_t ptxGPIO_Deinit (ptxGPIO_t *gpioComp)
 Deinitializes the GPIO Component.
 
ptxStatus_t ptxGPIO_Config (ptxGPIO_t *gpioComp, ptxGPIO_Pin_t gpioNr, ptxGPIO_Config_t gpioConfig, ptxGPIO_Flags_t gpioFlags)
 Configures a selected GPIO-pin to work as input or output.
 
ptxStatus_t ptxGPIO_Write (ptxGPIO_t *gpioComp, ptxGPIO_Pin_t gpioNr, uint8_t gpioValue)
 Writes the selected GPIO-pin high or low.
 
ptxStatus_t ptxGPIO_Read (ptxGPIO_t *gpioComp, ptxGPIO_Pin_t gpioNr, uint8_t *gpioValue)
 Reads the current value of a selected GPIO-pin.
 
ptxStatus_t ptxGPIO_Write_DAC (ptxGPIO_t *gpioComp, uint8_t dacValue)
 Sets 5-bit value to DAC (pin DAC_0)
 

Detailed Description

Macro Definition Documentation

◆ PTX_GPIO_FLAGS_ENABLE_HIGH_DRIVER_STRENGTH

#define PTX_GPIO_FLAGS_ENABLE_HIGH_DRIVER_STRENGTH   (uint8_t)0x02

Enable high output driver strength (output mode)

◆ PTX_GPIO_FLAGS_ENABLE_INTERNAL_PULLUP

#define PTX_GPIO_FLAGS_ENABLE_INTERNAL_PULLUP   (uint8_t)0x01

GPIO Flags.

Enable internal pull-up resistor (input mode)

Function Documentation

◆ ptxGPIO_Config()

ptxStatus_t ptxGPIO_Config ( ptxGPIO_t * gpioComp,
ptxGPIO_Pin_t gpioNr,
ptxGPIO_Config_t gpioConfig,
ptxGPIO_Flags_t gpioFlags )

Configures a selected GPIO-pin to work as input or output.

Parameters
[in]gpioCompPointer to an initialized instance of the GPIO component.
[in]gpioNrGPIO number.
[in]gpioConfigGPIO configuration (input, output, special function).
[in]gpioFlagsGPIO flags (e.g. enable internal pull-up resistor, enable high driver strength).
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxGPIO_Deinit()

ptxStatus_t ptxGPIO_Deinit ( ptxGPIO_t * gpioComp)

Deinitializes the GPIO Component.

Parameters
[in]gpioCompPointer to an initialized instance of the GPIO component.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxGPIO_Init()

ptxStatus_t ptxGPIO_Init ( ptxGPIO_t * gpioComp,
ptxGPIO_InitParams_t * initParams )

Initializes the GPIO Component.

Parameters
[in]gpioCompPointer to an allocated instance of the GPIO-component.
[in]initParamsPointer to initialization parameters.
Returns
Status, indicating whether the operation was successful.

◆ ptxGPIO_Read()

ptxStatus_t ptxGPIO_Read ( ptxGPIO_t * gpioComp,
ptxGPIO_Pin_t gpioNr,
uint8_t * gpioValue )

Reads the current value of a selected GPIO-pin.

Parameters
[in]gpioCompPointer to an initialized instance of the GPIO component.
[in]gpioNrGPIO number.
[out]gpioValuePointer to variable storing GPIO-value.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxGPIO_Write()

ptxStatus_t ptxGPIO_Write ( ptxGPIO_t * gpioComp,
ptxGPIO_Pin_t gpioNr,
uint8_t gpioValue )

Writes the selected GPIO-pin high or low.

Parameters
[in]gpioCompPointer to an initialized instance of the GPIO component.
[in]gpioNrGPIO number.
[in]gpioValueValue to set (!= 0 = High, 0 = Low).
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxGPIO_Write_DAC()

ptxStatus_t ptxGPIO_Write_DAC ( ptxGPIO_t * gpioComp,
uint8_t dacValue )

Sets 5-bit value to DAC (pin DAC_0)

Parameters
[in]gpioCompPointer to an initialized instance of the GPIO component.
[in]dacValue5-bit DAC-value.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.