RZ/A Flexible Software Package Documentation  Release v3.0.0

 
I/O Ports (r_ioport)

Functions

fsp_err_t R_IOPORT_Open (ioport_ctrl_t *const p_ctrl, const ioport_cfg_t *p_cfg)
 
fsp_err_t R_IOPORT_Close (ioport_ctrl_t *const p_ctrl)
 
fsp_err_t R_IOPORT_PinsCfg (ioport_ctrl_t *const p_ctrl, const ioport_cfg_t *p_cfg)
 
fsp_err_t R_IOPORT_PinCfg (ioport_ctrl_t *const p_ctrl, bsp_io_port_pin_t pin, uint32_t cfg)
 
fsp_err_t R_IOPORT_PinEventInputRead (ioport_ctrl_t *const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t *p_pin_event)
 
fsp_err_t R_IOPORT_PinEventOutputWrite (ioport_ctrl_t *const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t pin_value)
 
fsp_err_t R_IOPORT_PinRead (ioport_ctrl_t *const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t *p_pin_value)
 
fsp_err_t R_IOPORT_PinWrite (ioport_ctrl_t *const p_ctrl, bsp_io_port_pin_t pin, bsp_io_level_t level)
 
fsp_err_t R_IOPORT_PortDirectionSet (ioport_ctrl_t *const p_ctrl, bsp_io_port_t port, ioport_size_t direction_values, ioport_size_t mask)
 
fsp_err_t R_IOPORT_PortEventInputRead (ioport_ctrl_t *const p_ctrl, bsp_io_port_t port, ioport_size_t *event_data)
 
fsp_err_t R_IOPORT_PortEventOutputWrite (ioport_ctrl_t *const p_ctrl, bsp_io_port_t port, ioport_size_t event_data, ioport_size_t mask_value)
 
fsp_err_t R_IOPORT_PortRead (ioport_ctrl_t *const p_ctrl, bsp_io_port_t port, ioport_size_t *p_port_value)
 
fsp_err_t R_IOPORT_PortWrite (ioport_ctrl_t *const p_ctrl, bsp_io_port_t port, ioport_size_t value, ioport_size_t mask)
 

Detailed Description

Driver for the I/O Ports peripheral on RZ MPUs. This module implements the I/O Port Interface.

Overview

The I/O port pins operate as general I/O port pins, I/O pins for peripheral modules, interrupt input pins, analog I/O, or bus control pins.

Features

The IOPORT HAL module can configure the following pin settings:

The module also provides the following functionality:

Configuration

The I/O PORT HAL module must be configured by the user for the desired operation. The operating state of an I/O pin can be set via the RZ Configuraton tool. When the project is built a pin configuration file is created. The BSP will automatically configure the MPU IO ports accordingly at startup using the same API functions mentioned in this document.

Build Time Configurations for r_ioport

The following build time configurations are defined in fsp_cfg/r_ioport_cfg.h:

ConfigurationOptionsDefaultDescription
Parameter Checking
  • Default (BSP)
  • Enabled
  • Disabled
Default (BSP) If selected code for parameter checking is included in the build.

Configurations for System > I/O Port (r_ioport)

This module can be added to the Stacks tab via New Stack > System > I/O Port (r_ioport).

ConfigurationOptionsDefaultDescription
NameName must be a valid C symbolg_ioport Module name.
Pin Configuration NameName must be a valid C symbolg_bsp_pin_cfg Name for pin configuration structure

Clock Configuration

The I/O PORT HAL module does not require a specific clock configuration.

Pin Configuration

The IOPORT module is used for configuring pins.

Usage Notes

Examples

Basic Example

This is a basic example of minimal use of the IOPORT in an application.

void basic_example ()
{
bsp_io_level_t readLevel;
fsp_err_t err;
/* Initialize the IOPORT module and configure the pins
* Note: The default pin configuration name in the RZ Configuraton tool is g_bsp_pin_cfg */
err = R_IOPORT_Open(&g_ioport_ctrl, &g_bsp_pin_cfg);
/* Handle any errors. This function should be defined by the user. */
handle_error(err);
/* Call R_IOPORT_PinsCfg if the configuration was not part of initial configurations made in open */
err = R_IOPORT_PinsCfg(&g_ioport_ctrl, &g_runtime_pin_cfg);
handle_error(err);
/* Set Pin 00 of Port 01 to High */
handle_error(err);
/* Read Pin 00 of Port 01 */
err = R_IOPORT_PinRead(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_00, &readLevel);
handle_error(err);
}

Blinky Example

This example uses IOPORT to configure and toggle a pin to blink an LED.

#define DELAY_TIME (100)
void blinky_example ()
{
fsp_err_t err;
/* Initialize the IOPORT module and configure the pins */
err = R_IOPORT_Open(&g_ioport_ctrl, &g_bsp_pin_cfg);
/* Handle any errors. This function should be defined by the user. */
handle_error(err);
/* Configure Pin as output
* Call the R_IOPORT_PinCfg if the configuration was not part of initial configurations made in open */
handle_error(err);
while (1)
{
/* Determine the next state of the LEDs */
if (BSP_IO_LEVEL_LOW == level)
{
}
else
{
}
/* Update LED of PMOD board connected to PMOD0 of RZ/A3UL SMARC board */
err = R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_00, level);
handle_error(err);
/* Delay */
}
}

Data Structures

struct  ioport_instance_ctrl_t
 
struct  ioport_event_single_t
 
struct  ioport_event_group_output_t
 
struct  ioport_event_group_input_t
 
struct  ioport_extend_cfg_t
 

Enumerations

enum  ioport_peripheral_t
 
enum  ioport_cfg_options_t
 
enum  ioport_event_pin_selection_t
 
enum  ioport_event_output_operation_t
 
enum  ioport_event_control_t
 
enum  ioport_event_direction_t
 
enum  ioport_event_detection_t
 
enum  ioport_event_initial_buffer_value_t
 

Data Structure Documentation

◆ ioport_instance_ctrl_t

struct ioport_instance_ctrl_t

IOPORT private control block. DO NOT MODIFY. Initialization occurs when R_IOPORT_Open() is called.

◆ ioport_event_single_t

struct ioport_event_single_t

Single port configuration

Note
Event link must be configured by the ELC
Data Fields
ioport_event_control_t event_control Event link control for single port.
ioport_event_direction_t direction Event direction for single port.
uint16_t port_num Port number specified to single port.
ioport_event_output_operation_t operation Single port operation select.
ioport_event_detection_t edge_detection Edge detection select.

◆ ioport_event_group_output_t

struct ioport_event_group_output_t

Output port group configuration

Note
Event link must be configured by the ELC
Data Fields
uint8_t pin_select Port number specified to output port group.
ioport_event_output_operation_t operation Port group operation select.

◆ ioport_event_group_input_t

struct ioport_event_group_input_t

Input port group configuration

Note
Event link must be configured by the ELC
Data Fields
ioport_event_control_t event_control Event link control for input port group.
ioport_event_detection_t edge_detection Edge detection select.
ioport_event_control_t overwrite_control Buffer register overwrite control.
uint8_t pin_select Port number specified to input port group.
uint8_t buffer_init_value Buffer register initial value.

◆ ioport_extend_cfg_t

struct ioport_extend_cfg_t

IOPORT extended configuration for event link function

Note
Event link must be configured by the ELC
Data Fields
ioport_event_group_output_t
const *
p_port_group_output_cfg Pointer to output port group configuration.
ioport_event_group_input_t const * p_port_group_input_cfg Pointer to input port group configuration.
ioport_event_single_t const * p_single_port_cfg Pointer to single input port configuration.

Enumeration Type Documentation

◆ ioport_peripheral_t

Superset of all peripheral functions.

Enumerator
IOPORT_PERIPHERAL_MODE0 

Pin will function as a Mode0 peripheral pin

IOPORT_PERIPHERAL_MODE1 

Pin will function as a Mode1 peripheral pin

IOPORT_PERIPHERAL_MODE2 

Pin will function as a Mode2 peripheral pin

IOPORT_PERIPHERAL_MODE3 

Pin will function as a Mode3 peripheral pin

IOPORT_PERIPHERAL_MODE4 

Pin will function as a Mode4 peripheral pin

IOPORT_PERIPHERAL_MODE5 

Pin will function as a Mode5 peripheral pin

IOPORT_PERIPHERAL_MODE6 

Pin will function as a Mode6 peripheral pin

IOPORT_PERIPHERAL_MODE7 

Pin will function as a Mode7 peripheral pin

IOPORT_PERIPHERAL_MODE8 

Pin will function as a Mode8 peripheral pin

IOPORT_PERIPHERAL_MODE9 

Pin will function as a Mode9 peripheral pin

IOPORT_PERIPHERAL_MODE10 

Pin will function as a Mode10 peripheral pin

IOPORT_PERIPHERAL_MODE11 

Pin will function as a Mode11 peripheral pin

IOPORT_PERIPHERAL_MODE12 

Pin will function as a Mode12 peripheral pin

IOPORT_PERIPHERAL_MODE13 

Pin will function as a Mode13 peripheral pin

IOPORT_PERIPHERAL_MODE14 

Pin will function as a Mode14 peripheral pin

IOPORT_PERIPHERAL_MODE15 

Pin will function as a Mode15 peripheral pin

◆ ioport_cfg_options_t

Options to configure pin functions

Enumerator
IOPORT_CFG_PORT_DIRECTION_HIZ 

Sets the pin direction to Hi-Z (default)

IOPORT_CFG_PORT_DIRECTION_INPUT 

Sets the pin direction to input.

IOPORT_CFG_PORT_DIRECTION_OUTPUT 

Sets the pin direction to output (input disable)

IOPORT_CFG_PORT_DIRECTION_OUTPUT_INPUT 

Sets the pin direction to output (input enable)

IOPORT_CFG_PORT_OUTPUT_LOW 

Sets the pin level to low.

IOPORT_CFG_PORT_OUTPUT_HIGH 

Sets the pin level to high.

IOPORT_CFG_PULLUP_PULLDOWN_DISABLE 

Disable the pin's internal pull-up and pull-down.

IOPORT_CFG_PULLUP_ENABLE 

Enables the pin's internal pull-up.

IOPORT_CFG_PULLDOWN_ENABLE 

Enables the pin's internal pull-down.

IOPORT_CFG_NOD_DISABLE 

Disable the pin's N-ch open-drain.

IOPORT_CFG_NOD_ENABLE 

Enables the pin's N-ch open-drain.

IOPORT_CFG_SCHMITT_DISABLE 

Disable the pin's Schmitt-trigger input.

IOPORT_CFG_SCHMITT_ENABLE 

Enables the pin's Schmitt-trigger input.

IOPORT_CFG_DRIVE_B00 

Sets the IOLH register value to b'00.

IOPORT_CFG_DRIVE_B01 

Sets the IOLH register value to b'01.

IOPORT_CFG_DRIVE_B10 

Sets the IOLH register value to b'10.

IOPORT_CFG_DRIVE_B11 

Sets the IOLH register value to b'11.

IOPORT_CFG_TINT_DISABLE 

Disable IRQ functionality for a pin.

IOPORT_CFG_TINT_ENABLE 

Sets pin as an IRQ pin.

IOPORT_CFG_SLEW_RATE_SLOW 

Sets the pin slew-rate to slow.

IOPORT_CFG_SLEW_RATE_FAST 

Sets the pin slew-rate to fast.

IOPORT_CFG_SPECIAL_PURPOSE_PORT_INPUT_DISABLE 

Disable input the pin of special purpose port.

IOPORT_CFG_SPECIAL_PURPOSE_PORT_INPUT_ENABLE 

Sets the pin of special purpose port to input.

IOPORT_CFG_NOISE_FILTER_OFF 

Noise filter disable.

IOPORT_CFG_NOISE_FILTER_ON 

Noise filter enable.

IOPORT_CFG_NOISE_FILTER_NUM_4STAGE 

Sets the pin noise filter to 4-stage filter.

IOPORT_CFG_NOISE_FILTER_NUM_8STAGE 

Sets the pin noise filter to 8-stage filter.

IOPORT_CFG_NOISE_FILTER_NUM_12STAGE 

Sets the pin noise filter to 12-stage filter.

IOPORT_CFG_NOISE_FILTER_NUM_16STAGE 

Sets the pin noise filter to 16-stage filter.

IOPORT_CFG_NOISE_FILTER_DIVIDED_B00 

Sets the FILCLKSEL register value to b'00.

IOPORT_CFG_NOISE_FILTER_DIVIDED_B01 

Sets the FILCLKSEL register value to b'01.

IOPORT_CFG_NOISE_FILTER_DIVIDED_B10 

Sets the FILCLKSEL register value to b'10.

IOPORT_CFG_NOISE_FILTER_DIVIDED_B11 

Sets the FILCLKSEL register value to b'11.

IOPORT_CFG_PERIPHERAL_PIN 

Enables pin to operate as a peripheral pin.

◆ ioport_event_pin_selection_t

Pin selection for port group

Note
Event link must be configured by the ELC
Enumerator
IOPORT_EVENT_PIN_SELECTION_NONE 

No pin selection for port group.

IOPORT_EVENT_PIN_SELECTION_PIN_0 

Select pin 0 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_1 

Select pin 1 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_2 

Select pin 2 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_3 

Select pin 3 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_4 

Select pin 4 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_5 

Select pin 5 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_6 

Select pin 6 to port group.

IOPORT_EVENT_PIN_SELECTION_PIN_7 

Select pin 7 to port group.

◆ ioport_event_output_operation_t

Port group operation

Note
Event link must be configured by the ELC
Enumerator
IOPORT_EVENT_OUTPUT_OPERATION_LOW 

Set Low output to output operation.

IOPORT_EVENT_OUTPUT_OPERATION_HIGH 

Set High output to output operation.

IOPORT_EVENT_OUTPUT_OPERATION_TOGGLE 

Set toggle output to output operation.

IOPORT_EVENT_OUTPUT_OPERATION_BUFFER 

Set buffer value output to output operation.

◆ ioport_event_control_t

Input port group event control

Note
Event link must be configured by the ELC
Enumerator
IOPORT_EVENT_CONTROL_DISABLE 

Disable function related with event link.

IOPORT_EVENT_CONTROL_ENABLE 

Enable function related with event link.

◆ ioport_event_direction_t

Single port event direction

Note
Event link must be configured by the ELC
Enumerator
IOPORT_EVENT_DIRECTION_OUTPUT 

Set output direction to single port.

IOPORT_EVENT_DIRECTION_INPUT 

Set input direction to single port.

◆ ioport_event_detection_t

Input event edge detection

Note
Event link must be configured by the ELC
Enumerator
IOPORT_EVENT_DETECTION_RISING_EDGE 

Set rising edge to event detection for input event.

IOPORT_EVENT_DETECTION_FALLING_EDGE 

Set falling edge to event detection for input event.

IOPORT_EVENT_DETECTION_BOTH_EGDE 

Set both edges to event detection for input event.

◆ ioport_event_initial_buffer_value_t

Initial value for buffer register

Note
Event link must be configured by the ELC
Enumerator
IOPORT_EVENT_INITIAL_BUFFER_VALUE_LOW 

Set low to initial value of buffer register for input port group.

IOPORT_EVENT_INITIAL_BUFFER_VALUE_HIGH 

Set high to initial value of buffer register for input port group.

Function Documentation

◆ R_IOPORT_Open()

fsp_err_t R_IOPORT_Open ( ioport_ctrl_t *const  p_ctrl,
const ioport_cfg_t p_cfg 
)

Initializes internal driver data, then calls pin configuration function to configure pins.

Return values
FSP_SUCCESSPin configuration data written to PFS register(s)
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_ALREADY_OPENModule is already open.

◆ R_IOPORT_Close()

fsp_err_t R_IOPORT_Close ( ioport_ctrl_t *const  p_ctrl)

Resets IOPORT registers. Implements ioport_api_t::close

Return values
FSP_SUCCESSThe IOPORT was successfully uninitialized
FSP_ERR_ASSERTIONp_ctrl was NULL
FSP_ERR_NOT_OPENThe module has not been opened

◆ R_IOPORT_PinsCfg()

fsp_err_t R_IOPORT_PinsCfg ( ioport_ctrl_t *const  p_ctrl,
const ioport_cfg_t p_cfg 
)

Configures the functions of multiple pins by loading configuration data into each registers. Implements ioport_api_t::pinsCfg.

This function initializes the supplied list of each registers with the supplied values. This data define in pin_data.c. Different pin configurations can be loaded for different situations such as low power modes and testing.

Return values
FSP_SUCCESSPin configuration data written to each registers
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_ASSERTIONNULL pointer

◆ R_IOPORT_PinCfg()

fsp_err_t R_IOPORT_PinCfg ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_pin_t  pin,
uint32_t  cfg 
)

Configures the settings of a pin. Implements ioport_api_t::pinCfg.

Return values
FSP_SUCCESSPin configured
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_ASSERTIONNULL pointer
Note
This function is re-entrant for different pins. This function will change the configuration of the pin with the new configuration. For example it is not possible with this function to change the drive strength of a pin while leaving all the other pin settings unchanged. To achieve this the original settings with the required change will need to be written using this function.

◆ R_IOPORT_PinEventInputRead()

fsp_err_t R_IOPORT_PinEventInputRead ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_pin_t  pin,
bsp_io_level_t p_pin_event 
)

Reads the value of the event input data of a specific pin. Implements ioport_api_t::pinEventInputRead.

The pin event data is captured in response to a trigger from the ELC. This function enables this data to be read. Using the event system allows the captured data to be stored when it occurs and then read back at a later time.

Return values
FSP_SUCCESSPin read
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_INVALID_ARGUMENTPort is not valid ELC PORT.
FSP_ERR_UNSUPPORTEDThe function is not supported on the device which doesn't support ELC.

◆ R_IOPORT_PinEventOutputWrite()

fsp_err_t R_IOPORT_PinEventOutputWrite ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_pin_t  pin,
bsp_io_level_t  pin_value 
)

This function writes the event output data value to a pin. Implements ioport_api_t::pinEventOutputWrite.

Using the event system enables a pin state to be stored by this function in advance of being output on the pin. The output to the pin will occur when the ELC event occurs.

Return values
FSP_SUCCESSPin event data written
FSP_ERR_INVALID_ARGUMENTPort or Pin or value not valid
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_UNSUPPORTEDThe function is not supported on the device which doesn't support ELC.

◆ R_IOPORT_PinRead()

fsp_err_t R_IOPORT_PinRead ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_pin_t  pin,
bsp_io_level_t p_pin_value 
)

Reads the level on a pin. Implements ioport_api_t::pinRead.

Return values
FSP_SUCCESSPin read
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_NOT_OPENThe module has not been opened
Note
This function is re-entrant for different pins.

◆ R_IOPORT_PinWrite()

fsp_err_t R_IOPORT_PinWrite ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_pin_t  pin,
bsp_io_level_t  level 
)

Sets a pin's output either high or low. Implements ioport_api_t::pinWrite.

Return values
FSP_SUCCESSPin written to
FSP_ERR_INVALID_ARGUMENTThe pin and/or level not valid
FSP_ERR_NOT_OPENThe module has not been opene
FSP_ERR_ASSERTIONNULL pointerd
Note
This function is re-entrant for different pins.

◆ R_IOPORT_PortDirectionSet()

fsp_err_t R_IOPORT_PortDirectionSet ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_t  port,
ioport_size_t  direction_values,
ioport_size_t  mask 
)

Sets the direction of individual pins on a port. Implements ioport_api_t::portDirectionSet().

Multiple pins on a port can be set to inputs or outputs at once. Each bit in the mask parameter corresponds to a pin on the port. For example, bit[9:8] corresponds to pin 4, bit[7:6] to pin 3, and so on. If bits are set to b'11 then the corresponding pin will be changed to an input or an output or Hi-Z as specified by the direction values. If a mask bits are set to b'00 then the direction of the pin will not be changed.

Return values
FSP_SUCCESSPort direction updated
FSP_ERR_INVALID_ARGUMENTThe port and/or mask not valid
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_ASSERTIONNULL pointer
Note
This function is re-entrant for different ports.

◆ R_IOPORT_PortEventInputRead()

fsp_err_t R_IOPORT_PortEventInputRead ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_t  port,
ioport_size_t p_event_data 
)

Reads the value of the event input data. Implements ioport_api_t::portEventInputRead().

The event input data for the port will be read. Each bit in the returned value corresponds to a pin on the port. For example, bit 7 corresponds to pin 7, bit 6 to pin 6, and so on.

The port event data is captured in response to a trigger from the ELC. This function enables this data to be read. Using the event system allows the captured data to be stored when it occurs and then read back at a later time.

Return values
FSP_SUCCESSPort read
FSP_ERR_INVALID_ARGUMENTPort not a valid ELC port
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_UNSUPPORTEDThe function is not supported on the device which doesn't support ELC.

◆ R_IOPORT_PortEventOutputWrite()

fsp_err_t R_IOPORT_PortEventOutputWrite ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_t  port,
ioport_size_t  event_data,
ioport_size_t  mask_value 
)

This function writes the set and reset event output data for a port. Implements ioport_api_t::portEventOutputWrite.

Using the event system enables a port state to be stored by this function in advance of being output on the port. The output to the port will occur when the ELC event occurs.

The input value will be written to the specified port when an ELC event configured for that port occurs. Each bit in the value parameter corresponds to a bit on the port. For example, bit 7 corresponds to pin 7, bit 6 to pin 6, and so on. Each bit in the mask parameter corresponds to a pin on the port.

Return values
FSP_SUCCESSPort event data written
FSP_ERR_INVALID_ARGUMENTPort or Mask not valid
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_UNSUPPORTEDThe function is not supported on the device which doesn't support ELC.

◆ R_IOPORT_PortRead()

fsp_err_t R_IOPORT_PortRead ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_t  port,
ioport_size_t p_port_value 
)

Reads the value on an IO port. Implements ioport_api_t::portRead.

The specified port will be read, and the levels for all the pins will be returned. Each bit in the returned value corresponds to a pin on the port. For example, bit 4 corresponds to pin 4, bit 3 to pin 3, and so on.

Return values
FSP_SUCCESSPort read
FSP_ERR_ASSERTIONNULL pointer
FSP_ERR_NOT_OPENThe module has not been opened
Note
This function is re-entrant for different ports.

◆ R_IOPORT_PortWrite()

fsp_err_t R_IOPORT_PortWrite ( ioport_ctrl_t *const  p_ctrl,
bsp_io_port_t  port,
ioport_size_t  value,
ioport_size_t  mask 
)

Writes to multiple pins on a port. Implements ioport_api_t::portWrite.

The input value will be written to the specified port. Each bit in the value parameter corresponds to a bit on the port. For example, bit 4 corresponds to pin 4, bit 3 to pin 3, and so on. Each bit in the mask parameter corresponds to a pin on the port.

Only the bits with the corresponding bit in the mask value set will be updated. For example, value = 0xFFFF, mask = 0x0003 results in only bits 0 and 1 being updated.

Return values
FSP_SUCCESSPort written to
FSP_ERR_INVALID_ARGUMENTThe port and/or mask not valid
FSP_ERR_NOT_OPENThe module has not been opened
FSP_ERR_ASSERTIONNULL pointerd
Note
This function is re-entrant for different ports.