SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::lib::f2972 Class Reference

#include <f2972.hpp>

Public Types

enum class  port : uint8_t { RF1 , RF2 }

Public Member Functions

 f2972 (const etl::istring &name, bsp::gpio &en, bsp::gpio &ctl)
const etl::istring & name () const
void enable (bool set=true)
bool enabled () const
void set_port (port p)
port active_port () const

Detailed Description

Class for controlling the F2972 RF-switch

Definition at line 34 of file f2972.hpp.

Member Enumeration Documentation

◆ port

enum class satnogs::comms::lib::f2972::port : uint8_t
strong
Enumerator
RF1 
RF2 

Definition at line 37 of file f2972.hpp.

Constructor & Destructor Documentation

◆ f2972()

satnogs::comms::lib::f2972::f2972 ( const etl::istring & name,
bsp::gpio & en,
bsp::gpio & ctl )

Creates an object for controlling the F2972 RF-switch. If the initialization is successful the switch is set to a disabled state. In this state port ports are terminated. However, if the switch is enabled, the first selected port will be the RF1, unless the user specifies another one.

Parameters
namea descriptive name of the switch
enthe GPIO of the EN pin
ctlthe GPIO of the CTL pin

Definition at line 38 of file f2972.cpp.

Member Function Documentation

◆ active_port()

f2972::port satnogs::comms::lib::f2972::active_port ( ) const
Returns
the selected port. If the switch is disabled, the return value does not makes sense. Check the datasheet for more details

Definition at line 101 of file f2972.cpp.

◆ enable()

void satnogs::comms::lib::f2972::enable ( bool set = true)

Enables/Disables the RF-switch

Parameters
setif set to true the switch is enabled, otherwise it is disabled

Definition at line 60 of file f2972.cpp.

◆ enabled()

bool satnogs::comms::lib::f2972::enabled ( ) const
Returns
true if the switch is enabled, false otherwise

Definition at line 70 of file f2972.cpp.

◆ name()

const etl::istring & satnogs::comms::lib::f2972::name ( ) const
Returns
the name of the switch

Definition at line 50 of file f2972.cpp.

◆ set_port()

void satnogs::comms::lib::f2972::set_port ( port p)

Selects the RF-switch port

Parameters
pthe port to connect with the RFC

Definition at line 80 of file f2972.cpp.


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