The class which defines a slice of bits from within a device register (a location to read/write data from)
More...
#include <Adafruit_BusIO_Register.h>
|
| Adafruit_BusIO_RegisterBits (Adafruit_BusIO_Register *reg, uint8_t bits, uint8_t shift) |
| Create a slice of the register that we can address without touching other bits.
|
|
bool | write (uint32_t value) |
| Write 4 bytes of data to the register.
|
|
uint32_t | read (void) |
| Read 4 bytes of data from the register.
|
|
The class which defines a slice of bits from within a device register (a location to read/write data from)
◆ Adafruit_BusIO_RegisterBits()
Adafruit_BusIO_RegisterBits::Adafruit_BusIO_RegisterBits |
( |
Adafruit_BusIO_Register * | reg, |
|
|
uint8_t | bits, |
|
|
uint8_t | shift ) |
Create a slice of the register that we can address without touching other bits.
- Parameters
-
reg | The Adafruit_BusIO_Register which defines the bus/register |
bits | The number of bits wide we are slicing |
shift | The number of bits that our bit-slice is shifted from LSB |
◆ read()
uint32_t Adafruit_BusIO_RegisterBits::read |
( |
void | | ) |
|
Read 4 bytes of data from the register.
- Returns
- data The 4 bytes to read
◆ write()
bool Adafruit_BusIO_RegisterBits::write |
( |
uint32_t | data | ) |
|
Write 4 bytes of data to the register.
- Parameters
-
- Returns
- True on successful write (only really useful for I2C as SPI is uncheckable)
◆ _bits
uint8_t Adafruit_BusIO_RegisterBits::_bits |
|
private |
◆ _register
◆ _shift
uint8_t Adafruit_BusIO_RegisterBits::_shift |
|
private |
The documentation for this class was generated from the following files: