REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
front_panel.h
Go to the documentation of this file.
Definition base.h:114
Entity()=default
Definition AD9834.h:13
The DAC60508 is the 12-Bit 8-channel DAC, used in the MInt-Block for the initial conditions.
Definition DAC60508.h:17
The SR74HCT595 is an 8-Bit Shift Register with 3-State Output Registers.
Definition SR74HCT595.h:16
A trigger function exploits the fact that setting an address on the bus triggers an action (TODO: Is ...
Definition functions.h:33
utils::status write_to_hardware() const
Definition front_panel.cpp:57
bool set(const uint8_t led, bool on)
Sets specified front led to the specified value.
Definition front_panel.cpp:36
float get_dac_out1() const
Definition front_panel.cpp:147
void awake()
Resumes outputs of the function generator to regular operation, according to the previously specified...
Definition front_panel.cpp:151
bool set_dac_out1(float value)
Writes the DACout1 constant voltage output. Possible values are: [-2V, 2V].
Definition front_panel.cpp:160
float get_real_phase() const
Returns the actually set phase of the function generator, containing rounding errors.
Definition front_panel.cpp:119
float get_frequency() const
Definition front_panel.cpp:123
void sleep()
Sets the sine / triangle output of the function generator to zero.
Definition front_panel.cpp:149
void set_frequency(float frequency)
Sets the frequency of the sine / triangle output in Hz.
Definition front_panel.cpp:72
bool is_installed() const
Returns wether an signal generator module is actually installed and active.
Definition front_panel.h:112
void set_wave_form(functions::AD9834::WaveForm wave_form)
Sets the wave form of the function generator output.
Definition front_panel.cpp:79
float get_square_voltage_high() const
Definition front_panel.cpp:137
float get_offset() const
Definition front_panel.cpp:141
float get_dac_out0() const
Definition front_panel.cpp:145
SignalGenerator()
Definition front_panel.cpp:63
float get_phase() const
Definition front_panel.cpp:125
void set_phase(float phase)
Sets the phase of the frequency outputs synchronised to the reset pin.
Definition front_panel.cpp:76
bool set_square_voltage_high(float high)
Sets the upper value of the square output in machine units.
Definition front_panel.cpp:101
float get_real_frequency() const
Returns the actually set frequency of the function generator, containing rounding errors.
Definition front_panel.cpp:115
float get_amplitude() const
Definition front_panel.cpp:131
bool set_offset(float offset)
Sets the constant offset of the sine or triangle output in machine units.
Definition front_panel.cpp:108
utils::status write_to_hardware()
Definition front_panel.cpp:168
bool set_dac_out0(float value)
Writes the DACout0 constant voltage output. Possible values are: [-2V, 2V].
Definition front_panel.cpp:153
float get_square_voltage_low() const
Definition front_panel.cpp:133
bool set_square_voltage_low(float low)
Sets the lower value of the square output in machine units.
Definition front_panel.cpp:94
bool set_amplitude(float amplitude)
Sets the amplitude of the sine or triangle wave in machine units.
Definition front_panel.cpp:83
functions::AD9834::WaveForm get_wave_form() const
Definition front_panel.cpp:127
bool get_sleep() const
Definition front_panel.cpp:143
bool set_square_voltage_levels(float low, float high)
Sets the lower and upper value of the square output in machine units.
Definition front_panel.cpp:90
The Lucidac Front Panel is represented by this class.
Definition front_panel.h:26
utils::status write_to_hardware() override
Writes the hardware state of the LEDs and the signal generator.
Definition front_panel.cpp:23
utils::status _config_leds_from_json(const JsonVariantConst &cfg)
Definition front_panel.cpp:240
utils::status config_self_from_json(JsonObjectConst cfg) override
Deserialize a new configuration for this entity from a JsonObject.
Definition front_panel.cpp:222
void reset(entities::ResetAction action)
Resets the front panel to default state e.g. all LEDs off and signal generator sleeping.
Definition front_panel.cpp:16
static constexpr uint8_t DAC_OUT0_CH
Definition front_panel.h:58
static constexpr uint8_t DAC_AMPLITUDE_CH
Definition front_panel.h:54
std::vector< Entity * > get_child_entities() override
Definition front_panel.h:40
static constexpr uint8_t LED_REGISTER_IDX
Definition front_panel.h:50
class platform::LUCIDACFrontPanel::SignalGenerator signal_generator
class platform::LUCIDACFrontPanel::LEDs leds
static constexpr uint8_t DAC_SQUARE_LOW_CH
Definition front_panel.h:56
utils::status _config_signal_generator_from_json(const JsonVariantConst &cfg)
Definition front_panel.cpp:248
static constexpr uint8_t FUNCTION_GENERATOR_IDX
Definition front_panel.h:48
static constexpr uint8_t LED_REGISTER_RESET_IDX
Definition front_panel.h:52
void config_self_to_json(JsonObject &cfg) override
Serialize the configuration of this entity to a JsonObject.
Definition front_panel.cpp:338
static constexpr uint8_t DAC_SQUARE_HIGH_CH
Definition front_panel.h:55
static constexpr uint8_t LED_REGISTER_STORE_IDX
Definition front_panel.h:51
bool init()
Initializes the front panel and puts the signal generator to sleep.
Definition front_panel.cpp:10
static constexpr uint8_t DAC_OFFSET_CH
Definition front_panel.h:57
std::array< uint8_t, 8 > get_entity_eui() const override
Definition front_panel.cpp:218
static LUCIDACFrontPanel * from_entity_classifier(entities::EntityClassifier classifier, __attribute__((__unused__)) bus::addr_t block_address)
Definition front_panel.cpp:199
static constexpr uint8_t DAC_OUT1_CH
Definition front_panel.h:59
Entity * get_child_entity(const std::string &child_id) override
Definition front_panel.h:38
A recoverable error, inspired from https://abseil.io/docs/cpp/guides/status and https://github....
Definition error.h:35
__attribute__((section(".fastrun"), noinline, noclone, optimize("Os"))) int flash_sector_not_erased(uint32_t address)
Definition flasher.cpp:114
@ FRONT_PANEL
This concept of Backpanel / Backplane refers to the address decoder and periphery reachable by every ...
Definition cblock.h:15
Definition base.h:101