CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
GPIO::InputBits Struct Reference

Helper that defines a set of bits in a GPIO input word used for a specific purpose. More...

#include <platform-gpio.hh>

Public Member Functions

constexpr uint32_t mask () const
 The mask used to extract the bits.
uint32_t extract (uint32_t value) const
 Extract the bits for this range.

Public Attributes

const uint32_t Count
 The number of bits.
const uint32_t Shift
 The offset of the lowest bit in the GPIO input word.

Detailed Description

Helper that defines a set of bits in a GPIO input word used for a specific purpose.

Definition at line 43 of file platform-gpio.hh.

Member Function Documentation

◆ extract()

uint32_t GPIO::InputBits::extract ( uint32_t value) const
inlinenodiscard

Extract the bits for this range.

Definition at line 66 of file platform-gpio.hh.

References mask(), and Shift.

◆ mask()

uint32_t GPIO::InputBits::mask ( ) const
inlinenodiscardconstexpr

The mask used to extract the bits.

Definition at line 58 of file platform-gpio.hh.

References Count.

Referenced by extract().

Member Data Documentation

◆ Count

const uint32_t GPIO::InputBits::Count

The number of bits.

Definition at line 48 of file platform-gpio.hh.

Referenced by mask().

◆ Shift

const uint32_t GPIO::InputBits::Shift

The offset of the lowest bit in the GPIO input word.

Definition at line 53 of file platform-gpio.hh.

Referenced by extract().


The documentation for this struct was generated from the following file: