Adafruit Bus IO Library
|
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>
Public Member Functions | |
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. More... | |
bool | write (uint32_t value) |
Write 4 bytes of data to the register. More... | |
uint32_t | read (void) |
Read 4 bytes of data from the register. More... | |
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_Register * | reg, |
uint8_t | bits, | ||
uint8_t | shift | ||
) |
Create a slice of the register that we can address without touching other bits.
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 |
bool Adafruit_BusIO_RegisterBits::write | ( | uint32_t | data | ) |
Write 4 bytes of data to the register.
data | The 4 bytes to write |
uint32_t Adafruit_BusIO_RegisterBits::read | ( | void | ) |
Read 4 bytes of data from the register.