![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
#include <fpga.hpp>
Public Types | |
| enum class | reg : uint32_t { id = 0 , version = 1 , status = 2 } |
| enum class | hw : uint8_t { NONE , ALINX_AC7Z020 , LIBREWAVE } |
| enum class | boot_mode : uint8_t { JTAG , NAND , QSPI , EMMC } |
Public Member Functions | |
| fpga (hw h, bsp::spi &spi, power &pwr, bsp::gpio &fpga_done, bsp::gpio &boot_sel_1, bsp::gpio &boot_sel_0) | |
| Construct a new fpga::fpga object and disables it to ensure now excess power is accidentally used during resets. | |
| void | enable (bool en=true) |
| Enable/disable the FPGA subsystem. | |
| bool | enabled () const |
| Returns the state of the FPGA. | |
| void | write_reg (uint32_t regreg, uint32_t val) |
| uint32_t | read_reg (uint32_t regreg) |
| void | write_reg (reg r, uint32_t val) |
| uint32_t | read_reg (reg r) |
| bool | get_fpga_done () const |
| void | set_boot_mode (boot_mode mode) |
| boot_mode | get_boot_mode () const |
|
strong |
|
strong |
|
strong |
| satnogs::comms::lib::fpga::fpga | ( | hw | h, |
| bsp::spi & | spi, | ||
| power & | pwr, | ||
| bsp::gpio & | fpga_done, | ||
| bsp::gpio & | boot_sel_1, | ||
| bsp::gpio & | boot_sel_0 ) |
Construct a new fpga::fpga object and disables it to ensure now excess power is accidentally used during resets.
| h | the FPGA type attached |
| spi | SPI peripheral to communicate with the FPGA |
| pwr | the power subsystem |
| fpga_done | the FPGA_DONE GPIO |
| boot_sel_1 | second gpio for setting boot mode |
| boot_sel_0 | first gpio for setting boot mode |
boot modes: mode boot_sel_1 boot_sel_0 JTAG 0 0 NAND 0 1 QSPI 1 0 EMMC 1 1
| void satnogs::comms::lib::fpga::enable | ( | bool | en = true | ) |
| bool satnogs::comms::lib::fpga::enabled | ( | ) | const |
| fpga::boot_mode satnogs::comms::lib::fpga::get_boot_mode | ( | ) | const |
| uint32_t satnogs::comms::lib::fpga::read_reg | ( | uint32_t | reg | ) |
| void satnogs::comms::lib::fpga::set_boot_mode | ( | boot_mode | mode | ) |
| void satnogs::comms::lib::fpga::write_reg | ( | reg | r, |
| uint32_t | val ) |
| void satnogs::comms::lib::fpga::write_reg | ( | uint32_t | reg, |
| uint32_t | val ) |