26static board *m_instance =
nullptr;
38 if ((m_instance !=
nullptr) && m_instance->m_init) {
43 m_instance->m_init =
true;
56 return (m_instance !=
nullptr) && m_instance->m_init;
68 if ((m_instance ==
nullptr) || !m_instance->m_init) {
134 return m_uhf_antenna;
136 return m_sband_antenna;
152 return m_temperature.alert(s);
164 return m_temperature.get(s);
170 m_radio(p.radio_params,
io.radio_io, m_power, p.rx_msgq),
174 m_uhf_antenna(
io.uhf_antenna),
175 m_sband_antenna(
io.sband_antenna),
178 m_radio.uhf(), m_radio.sband())
Generic antenna definition.
IO peripherals required for the control of the various subsystems of the board.
Board initialization parameters.
comms::lib::power & power()
Returns a reference to the power subsystem.
comms::lib::emmc & emmc()
Returns a reference to the eMMC subsystem.
static void init(const io_conf &io, const params &p)
Initializes the board and creates a single instance.
static bool is_init()
Checks if the init() has already called by the user.
comms::lib::leds & leds()
Returns a reference to the LEDs subsystem.
comms::lib::radio & radio()
Returns a reference to the radio subsystem.
comms::lib::fpga & fpga()
Returns a reference to the FPGA subsystem.
static board & get_instance()
Gets a reference to the single instance of the Board interface class.
float temperature(temperature_sensor s) const
Gets the temperature from a specific sensor.
bool alert(temperature_sensor s) const
Checks if there is an alert from a specific sensor.
board(board const &)=delete
comms::lib::antenna & antenna(radio::interface iface)
Raised if the init() is called more than once.
Generic exception indicating an invalid argument.
LED control library for the SatNOGS-COMMS board.
Manages power supplies and monitors subsystem status.
Radio subsystem providing TX/RX functionality on UHF and S-Band.
interface
Radio interface identifier.
Raised if the get_instance() is called before the init().
temperature_sensor
Source of temperature readings.
const struct gpio_dt_spec emmc_en
const struct gpio_dt_spec fpga_done
const struct gpio_dt_spec emmc_rst
spi_bsp fpga_spi(fpga_spi_dev, fpga_spi_cfg)
const struct gpio_dt_spec led1
const struct gpio_dt_spec led0
i2c_bsp sensors_i2c(sens_i2c)
const struct gpio_dt_spec emmc_sel