REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Loading...
Searching...
No Matches
lucidac.cpp
Go to the documentation of this file.
12FLASHMEM LUCIDAC::LUCIDAC(LUCIDAC_HAL *hardware) : Carrier({Cluster(0)}, hardware), hardware(hardware) {}
118FLASHMEM const std::array<LUCIDAC::ACL, 8> &LUCIDAC::get_acl_select() const { return acl_select; }
120FLASHMEM void LUCIDAC::set_acl_select(const std::array<ACL, 8> &acl_select_) { acl_select = acl_select_; }
129FLASHMEM void LUCIDAC::reset_acl_select() { std::fill(acl_select.begin(), acl_select.end(), ACL::INTERNAL_); }
174 LOG_ALWAYS("platform::LUCIDAC::config_self_from_json: Expected acl_select[i] to be either 'internal' "
189 cfg_acl_select.add(acl_select[i] == platform::LUCIDAC_HAL::ACL::INTERNAL_ ? "internal" : "external");
Entity * get_child_entity(const std::string &child_id) override
Definition carrier.cpp:55
void config_self_to_json(JsonObject &cfg) override
Serialize the configuration of this entity to a JsonObject.
Definition carrier.cpp:89
std::vector< Entity * > get_child_entities() override
Definition carrier.cpp:45
utils::status config_self_from_json(JsonObjectConst cfg) override
Deserialize a new configuration for this entity from a JsonObject.
Definition carrier.cpp:67
Definition base.h:114
static uint8_t chip_cmd_word(uint8_t chip_input_idx, uint8_t chip_output_idx, bool connect=true)
Definition iblock.cpp:16
bool transfer8(uint8_t data_in, uint8_t *data_out=nullptr) const
Definition SR74HCT595.cpp:30
utils::status write_to_hardware() override
Writes the hardware state of the LEDs and the signal generator.
Definition front_panel.cpp:23
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
bool init()
Initializes the front panel and puts the signal generator to sleep.
Definition front_panel.cpp:10
Definition lucidac.h:15
const functions::TriggerFunction f_adc_switcher_matrix_reset
Definition lucidac.h:42
const functions::ICommandRegisterFunction f_adc_switcher_prg
Definition lucidac.h:39
static const SPISettings F_ADC_SWITCHER_PRG_SPI_SETTINGS
Definition lucidac.h:9
@ EXTERNAL_
@ INTERNAL_
bool write_adc_bus_mux(const std::array< int8_t, 8 > &channels) override
Write channel selection to ADC bus muxer.
Definition lucidac.cpp:45
const functions::TriggerFunction f_adc_switcher_sync
Definition lucidac.h:40
bool write_acl(std::array< ACL, 8 > acl)
Write bits to ACL shift register, from I-block input 24 (first element) to 31 (last element)
Definition lucidac.cpp:27
Definition lucidac.h:63
Entity * get_child_entity(const std::string &child_id) override
Definition lucidac.cpp:103
const std::array< ACL, 8 > & get_acl_select() const
Definition lucidac.cpp:118
void config_self_to_json(JsonObject &cfg) override
Serialize the configuration of this entity to a JsonObject.
Definition lucidac.cpp:182
std::vector< Entity * > get_child_entities() override
Definition lucidac.cpp:96
bool _config_acl_from_json(const JsonVariantConst &cfg)
Definition lucidac.cpp:163
utils::status config_self_from_json(JsonObjectConst cfg) override
Deserialize a new configuration for this entity from a JsonObject.
Definition lucidac.cpp:144
void set_acl_select(const std::array< ACL, 8 > &acl_select_)
Definition lucidac.cpp:120
A recoverable error, inspired from https://abseil.io/docs/cpp/guides/status and https://github....
Definition error.h:35
status & attach_to(status &other, const char *description="")
Attach this error message to another one. Is chainable, returns self.
Definition error.h:81
status & attach(const status &other, const char *description="")
Attach another error message to this one. Is chainable, returns self.
Definition error.h:72
constexpr addr_t address_from_tuple(uint8_t baddr, uint8_t faddr)
Definition bus.h:100
Definition base.h:101