REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches

#include <mblock_mul.h>

Inheritance diagram for blocks::MMulBlockHAL_V_1_0_X:
Collaboration diagram for blocks::MMulBlockHAL_V_1_0_X:

Public Member Functions

 MMulBlockHAL_V_1_0_X (bus::addr_t block_address)
 
bool init () override
 
bool write_calibration_input_offsets (uint8_t idx, uint16_t offset_x, uint16_t offset_y) override
 
bool write_calibration_output_offset (uint8_t idx, uint16_t offset_z) override
 
std::bitset< 8 > read_overload_flags () override
 
void reset_overload_flags () override
 
- Public Member Functions inherited from entities::EntitySharedHardware< MMulBlockHAL >
metadata::eui_t get_entity_eui () const
 
float read_temperature () const
 
metadata::eui_t get_entity_eui () const
 
float read_temperature () const
 

Static Public Member Functions

static float raw_to_float_calibration (uint16_t raw)
 Takes in DAC raw value, returns voltage recieved by multiplier.
 
static uint16_t float_to_raw_calibration (float value)
 Takes in voltage recieved by multiplier, returns DAC raw value.
 

Static Public Attributes

static constexpr float MIN_OFFSET = -0.1f
 
static constexpr float MAX_OFFSET = +0.1f
 
static constexpr uint16_t RAW_ZERO = functions::DAC60508::RAW_ZERO
 
static constexpr uint16_t RAW_MAX = functions::DAC60508::RAW_MAX
 

Protected Attributes

const functions::TriggerFunction f_overload_flags_reset
 
const functions::SR74HC16X f_overload_flags
 
const functions::DAC60508 f_calibration_dac_0
 
const functions::DAC60508 f_calibration_dac_1
 
- Protected Attributes inherited from entities::EntitySharedHardware< MMulBlockHAL >
const metadata::MetadataEditor f_meta
 
const functions::TMP127Q1 temperature_sensor
 
const metadata::MetadataEditor f_meta
 
const functions::TMP127Q1 temperature_sensor
 

Additional Inherited Members

- Protected Member Functions inherited from entities::EntitySharedHardware< MMulBlockHAL >
 EntitySharedHardware (bus::addr_t f_meta_addr, bus::addr_t temperature_sensor_addr, uint8_t alt_function_idx)
 
 EntitySharedHardware (bus::addr_t block_address, uint8_t alt_function_idx)
 
 EntitySharedHardware (bus::addr_t f_meta_addr, bus::addr_t temperature_sensor_addr, uint8_t alt_function_idx)
 
 EntitySharedHardware (bus::addr_t block_address, uint8_t alt_function_idx)
 

Detailed Description

Definition at line 24 of file mblock_mul.h.

Constructor & Destructor Documentation

◆ MMulBlockHAL_V_1_0_X()

blocks::MMulBlockHAL_V_1_0_X::MMulBlockHAL_V_1_0_X ( bus::addr_t block_address)
explicit

Member Function Documentation

◆ float_to_raw_calibration()

static uint16_t blocks::MMulBlockHAL_V_1_0_X::float_to_raw_calibration ( float value)
inlinestatic

Takes in voltage recieved by multiplier, returns DAC raw value.

Definition at line 50 of file mblock_mul.h.

References MAX_OFFSET, MIN_OFFSET, functions::DAC60508::RAW_MAX, and functions::DAC60508::RAW_ZERO.

◆ init()

bool blocks::MMulBlockHAL_V_1_0_X::init ( )
override

Definition at line 292 of file mblock_mul.cpp.

References f_calibration_dac_0, and f_calibration_dac_1.

◆ raw_to_float_calibration()

static float blocks::MMulBlockHAL_V_1_0_X::raw_to_float_calibration ( uint16_t raw)
inlinestatic

Takes in DAC raw value, returns voltage recieved by multiplier.

Definition at line 44 of file mblock_mul.h.

References MAX_OFFSET, MIN_OFFSET, functions::DAC60508::RAW_MAX, and functions::DAC60508::RAW_ZERO.

◆ read_overload_flags()

std::bitset< 8 > blocks::MMulBlockHAL_V_1_0_X::read_overload_flags ( )
override

◆ reset_overload_flags()

void blocks::MMulBlockHAL_V_1_0_X::reset_overload_flags ( )
override

◆ write_calibration_input_offsets()

bool blocks::MMulBlockHAL_V_1_0_X::write_calibration_input_offsets ( uint8_t idx,
uint16_t offset_x,
uint16_t offset_y )
override

◆ write_calibration_output_offset()

bool blocks::MMulBlockHAL_V_1_0_X::write_calibration_output_offset ( uint8_t idx,
uint16_t offset_z )
override

Member Data Documentation

◆ f_calibration_dac_0

const functions::DAC60508 blocks::MMulBlockHAL_V_1_0_X::f_calibration_dac_0
protected

Definition at line 28 of file mblock_mul.h.

Referenced by init(), MMulBlockHAL_V_1_0_X(), and write_calibration_input_offsets().

◆ f_calibration_dac_1

const functions::DAC60508 blocks::MMulBlockHAL_V_1_0_X::f_calibration_dac_1
protected

Definition at line 29 of file mblock_mul.h.

Referenced by init(), MMulBlockHAL_V_1_0_X(), and write_calibration_output_offset().

◆ f_overload_flags

const functions::SR74HC16X blocks::MMulBlockHAL_V_1_0_X::f_overload_flags
protected

Definition at line 27 of file mblock_mul.h.

Referenced by MMulBlockHAL_V_1_0_X(), and read_overload_flags().

◆ f_overload_flags_reset

const functions::TriggerFunction blocks::MMulBlockHAL_V_1_0_X::f_overload_flags_reset
protected

Definition at line 26 of file mblock_mul.h.

Referenced by MMulBlockHAL_V_1_0_X(), and reset_overload_flags().

◆ MAX_OFFSET

float blocks::MMulBlockHAL_V_1_0_X::MAX_OFFSET = +0.1f
staticconstexpr

Definition at line 41 of file mblock_mul.h.

Referenced by float_to_raw_calibration(), and raw_to_float_calibration().

◆ MIN_OFFSET

float blocks::MMulBlockHAL_V_1_0_X::MIN_OFFSET = -0.1f
staticconstexpr

Definition at line 40 of file mblock_mul.h.

Referenced by float_to_raw_calibration(), and raw_to_float_calibration().

◆ RAW_MAX

uint16_t blocks::MMulBlockHAL_V_1_0_X::RAW_MAX = functions::DAC60508::RAW_MAX
inlinestaticconstexpr

Definition at line 56 of file mblock_mul.h.

◆ RAW_ZERO

uint16_t blocks::MMulBlockHAL_V_1_0_X::RAW_ZERO = functions::DAC60508::RAW_ZERO
inlinestaticconstexpr

Definition at line 55 of file mblock_mul.h.


The documentation for this class was generated from the following files: