VPR CSR VIO HAL

group nrf_vpr_csr_vio_hal

Hardware access layer for managing the VPR RISC-V CPU Control and Status Registers for VPR IO (VPR CSR VIO).

Enums

enum nrf_vpr_csr_vio_out_shift_t

Shift sizes for output.

Values:

enumerator NRF_VPR_CSR_VIO_OUT_SHIFT_1

Shift OUT by 1 bit.

enumerator NRF_VPR_CSR_VIO_OUT_SHIFT_2

Shift OUT by 2 bits.

enumerator NRF_VPR_CSR_VIO_OUT_SHIFT_4

Shift OUT by 4 bits.

enumerator NRF_VPR_CSR_VIO_OUT_SHIFT_8

Shift OUT by 8 bits.

enumerator NRF_VPR_CSR_VIO_OUT_SHIFT_16

Shift OUT by 16 bits.

enum nrf_vpr_csr_vio_mode_in_t

Input modes.

Values:

enumerator NRF_VPR_CSR_VIO_MODE_IN_CONTINUOUS

Continuous sampling (if CPU is not sleeping).

enumerator NRF_VPR_CSR_VIO_MODE_IN_EVENT

Sampling on Counter 1 event.

Functions

NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vio_dir_get(void)

Function for getting the pin directions mask.

Returns:

Mask of pin directions. 0 is input, 1 is output.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dir_set(uint16_t value)

Function for setting the pin directions mask.

Parameters:
  • value[in] Mask of pin directions to be set. 0 is input, 1 is output.

NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vio_dir_buffered_get(void)

Function for getting the buffered pin directions mask.

Returns:

Mask of pin directions. 0 is input, 1 is output.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dir_buffered_set(uint16_t value)

Function for setting the buffered pin directions mask.

Parameters:
  • value[in] Mask of pin directions to be set. 0 is input, 1 is output.

NRF_STATIC_INLINE bool nrf_vpr_csr_vio_dir_buffered_dirty_check(void)

Function for retrieving the dirty status of buffered pin directions mask.

Return values:
  • true – Buffer is dirty.

  • fasle – Buffer is clean.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dir_toggle_set(uint16_t mask)

Function for setting the pin directions toggle mask.

Parameters:
  • mask[in] Mask of pin directions to be toggled.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dir_buffered_toggle_set(uint16_t mask)

Function for setting the buffered pin directions toggle mask.

Parameters:
  • mask[in] Mask of pin directions to be toggled.

NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vio_in_get(void)

Function for getting the input values.

Returns:

Mask of input states. 0 is low, 1 is high.

NRF_STATIC_INLINE nrf_vpr_csr_vio_mode_in_t nrf_vpr_csr_vio_mode_in_get(void)

Function for getting the input mode.

Returns:

Input mode.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_mode_in_set(nrf_vpr_csr_vio_mode_in_t mode)

Function for setting the input mode.

Parameters:
  • mode[in] Input mode to be set.

NRF_STATIC_INLINE uint16_t nrf_vpr_csr_vio_out_get(void)

Function for getting the output values.

Returns:

Mask of output states. 0 is low, 1 is high.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_out_set(uint16_t value)

Function for setting the output values.

Parameters:
  • value[in] Mask of output states to be set. 0 is low, 1 is high.

NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vio_out_buffered_get(void)

Function for getting the buffered output values.

Returns:

Mask of output states. 0 is low, 1 is high.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_out_buffered_set(uint32_t value)

Function for setting the buffered output values.

Parameters:
  • value[in] Mask of output states to be set. 0 is low, 1 is high.

NRF_STATIC_INLINE bool nrf_vpr_csr_vio_out_buffered_dirty_check(void)

Function for retrieving the dirty status of buffered output values.

Return values:
  • true – Buffer is dirty.

  • fasle – Buffer is clean.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_out_toggle_set(uint16_t mask)

Function for setting the output toggle mask.

Parameters:
  • mask[in] Mask of output to be toggled.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_out_toggle_buffered_set(uint16_t mask)

Function for setting the buffered output toggle mask.

Parameters:
  • mask[in] Mask of output to be toggled.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_out_combined_set(uint32_t value)

Function for setting the combined output and buffered output values.

Note

Lower 16 bits determine the output state, while higher 16 bits determine the buffered output state.

Parameters:
  • value[in] Mask of output states to be set. 0 is low, 1 is high.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_out_combined_toggle_set(uint32_t mask)

Function for setting the combined output and buffered output toggle mask.

Note

Lower 16 bits determine the output toggle, while higher 16 bits determine the buffered output toggle.

Parameters:
  • mask[in] Mask of output to be toggled.

NRF_STATIC_INLINE bool nrf_vpr_csr_vio_out_combined_dirty_check(void)

Function for retrieving the dirty status of combined output and buffered output values.

Return values:
  • true – Buffer is dirty.

  • fasle – Buffer is clean.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_mode_out_get(nrf_vpr_csr_vio_mode_out_t *p_mode)

Function for getting the configuration of output mode.

Parameters:
  • p_mode[out] Pointer to the structure to be filled with output mode.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_mode_out_set(nrf_vpr_csr_vio_mode_out_t const *p_mode)

Function for setting the configuration of output mode.

Parameters:
  • p_mode[in] Pointer to the structure with output mode to be set.

NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vio_dirout_get(void)

Function for getting the combined pin directions mask and output values.

Note

Lower 16 bits determine the output state, while higher 16 bits determine the pin directions.

Returns:

Mask of pin directions and output values.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dirout_set(uint32_t value)

Function for setting the combined pin directions mask and output values.

Note

Lower 16 bits determine the output state, while higher 16 bits determine the pin directions.

Parameters:
  • value[in] Mask of pin directions and output values.

NRF_STATIC_INLINE uint32_t nrf_vpr_csr_vio_dirout_buffered_get(void)

Function for getting the combined buffered pin directions mask and buffered output values.

Note

Lower 16 bits determine the buffered output state, while higher 16 bits determine the buffered pin directions.

Returns:

Mask of buffered pin directions and buffered output values.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dirout_buffered_set(uint32_t value)

Function for getting the combined buffered pin directions mask and buffered output values.

Note

Lower 16 bits determine the buffered output state, while higher 16 bits determine the buffered pin directions.

Parameters:
  • value[in] Mask of buffered pin directions and buffered output values.

NRF_STATIC_INLINE bool nrf_vpr_csr_vio_dirout_buffered_dirty_check(void)

Function for retrieving the dirty status of combined buffered pin directions mask and buffered output values.

Return values:
  • true – Buffer is dirty.

  • fasle – Buffer is clean.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dirout_toggle_set(uint32_t mask)

Function for setting the combined pin directions and output toggle masks.

Note

Lower 16 bits determine the output toggle, while higher 16 bits determine the pin directions toggle.

Parameters:
  • mask[in] Mask of values to be toggled.

NRF_STATIC_INLINE void nrf_vpr_csr_vio_dirout_toggle_buffered_set(uint32_t mask)

Function for setting the combined buffered pin directions and buffered output toggle masks.

Note

Lower 16 bits determine the buffered output toggle, while higher 16 bits determine the buffered pin directions toggle.

Parameters:
  • mask[in] Mask of values to be toggled.

struct nrf_vpr_csr_vio_mode_out_t
#include <nrf_vpr_csr_vio.h>

Output mode structure.

Public Members

bool shift_enable

Enable shift mode.

nrf_vpr_csr_vio_out_shift_t shift_size

Shift size.