REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Loading...
Searching...
No Matches
Public Member Functions |
Static Public Member Functions |
Static Public Attributes |
List of all members
functions::AD5452 Class Reference
The AD5452 is the 12-Bit Multiplying DAC, used in the C-Block (one AD5452 per lane). More...
#include <AD5452.h>
Inheritance diagram for functions::AD5452:

Collaboration diagram for functions::AD5452:

Public Member Functions | |
AD5452 (bus::addr_t address) | |
AD5452 (bus::addr_t base_addr, uint8_t func_addr_shift) | |
void | set_scale (float scale) |
Value gets clamped to min and max values. | |
void | set_scale (uint16_t scale_raw) |
DataFunction (bus::addr_t address, const SPISettings &spiSettings) | |
![]() | |
DataFunction (bus::addr_t address, const SPISettings &spiSettings) | |
void | begin_communication () const |
void | end_communication () const |
![]() | |
Function (bus::addr_t address) | |
Static Public Member Functions | |
static uint16_t | float_to_raw (float scale) |
static float | raw_to_float (uint16_t raw) |
Static Public Attributes | |
static const SPISettings | DEFAULT_SPI_SETTINGS {4'000'000, MSBFIRST, SPI_MODE1} |
static constexpr float | MIN_FACTOR = -1.1f |
static constexpr float | MAX_FACTOR = +1.1f |
static constexpr uint16_t | RAW_MIN = 0 |
static constexpr uint16_t | RAW_MAX = 4095 |
Additional Inherited Members | |
![]() | |
const SPISettings & | spi_settings |
![]() | |
const bus::addr_t | address |
![]() | |
void | transfer (const void *mosi_buf, void *miso_buf, size_t count) const |
uint8_t | transfer8 (uint8_t data_in) const |
uint16_t | transfer16 (uint16_t data_in) const |
uint32_t | transfer32 (uint32_t data_in) const |
![]() | |
static SPIClass & | get_raw_spi () |
Detailed Description
The AD5452 is the 12-Bit Multiplying DAC, used in the C-Block (one AD5452 per lane).
This class encapsulates the SPI programming access to the chip.
Constructor & Destructor Documentation
◆ AD5452() [1/2]
|
explicit |
Definition at line 9 of file AD5452.cpp.
◆ AD5452() [2/2]
functions::AD5452::AD5452 | ( | bus::addr_t | base_addr, |
uint8_t | func_addr_shift ) |
Definition at line 11 of file AD5452.cpp.
Member Function Documentation
◆ DataFunction()
functions::DataFunction::DataFunction | ( | bus::addr_t | address, |
const SPISettings & | spiSettings ) |
Definition at line 63 of file functions.cpp.
◆ float_to_raw()
|
static |
Definition at line 14 of file AD5452.cpp.
◆ raw_to_float()
|
static |
Definition at line 23 of file AD5452.cpp.
◆ set_scale() [1/2]
void functions::AD5452::set_scale | ( | float | scale | ) |
Value gets clamped to min and max values.
Definition at line 35 of file AD5452.cpp.
◆ set_scale() [2/2]
void functions::AD5452::set_scale | ( | uint16_t | scale_raw | ) |
Definition at line 27 of file AD5452.cpp.
References bus::spi.
Member Data Documentation
◆ DEFAULT_SPI_SETTINGS
|
static |
◆ MAX_FACTOR
◆ MIN_FACTOR
◆ RAW_MAX
◆ RAW_MIN
The documentation for this class was generated from the following files:
- lib/hardware/src/chips/AD5452.h
- lib/hardware/src/chips/AD5452.cpp