User Tools

SysInfo definition for FX3 v.60

sys_info_v60.h
// --------------------------------------------
#pragma pack(push, 1)
// --------------------------------------------
 
struct SysInfoV2{
    struct Sig {
        uint16_t size = {};
        uint8_t maj : 6 = {}; // the size has changed (members added or removed)
        uint8_t min : 2 = {}; // only some bitfields were added that used to be reserved
        uint8_t res : 8 = {};
    };
    struct Supp {
        bool usb3 : 1 = {};   // CyFx3DevIsUsb3Supported();
        bool otg : 1 = {};    // CyFx3DevIsOtgSupported();
        bool ram512 : 1 = {}; // CyFx3DevIsRam512Supported();
        bool i2s : 1 = {};    // CyFx3DevIsI2sSupported();
        bool gpif : 1 = {};   // CyFx3DevIsGpifSupported();
        bool gpif32 : 1 = {}; // CyFx3DevIsGpif32Supported();
        uint8_t res : 2 = {};
    };
    struct Config{
        bool i2c : 1 = {};    // CyFx3DevIOIsI2cConfigured();
        bool i2s : 1 = {};    // CyFx3DevIOIsI2sConfigured();
        bool uart : 1 = {};   // CyFx3DevIOIsUartConfigured();
        bool spi : 1 = {};    // CyFx3DevIOIsSpiConfigured();
        bool pib : 1 = {};    // CyFx3PibIsOn();
        bool dll : 1 = {};    // CyFx3PibGetDllStatus();
        bool lpp : 1 = {};    // CyFx3LppIsOn();
        uint8_t res : 1 = {};
    };
    struct Usb{
        enum class UsbSpeed: uint8_t{disconnected, fs, hs, ss};
        UsbSpeed speed : 3 = UsbSpeed::disconnected; // CyU3PUsbGetSpeed()
        bool auxPower : 1 = {};  // bit 6 on I2C expander at 0x21
        uint8_t res : 4 = {};
    };
    struct UsbErr{
        uint16_t phy = {}, lnk = {};
    };
 
    Sig sig;
    uint32_t uptime = {};                                // CyU3PGetTime()
    enum class CyPart: uint8_t {usb3014 = 0, unknown = 0xff} partno = CyPart::unknown; // CyFx3DevIdentifyPart() from cyfx3_api.h
    Supp supported;
    Config config;
    Usb usb;
    struct{
        uint32_t allocCnt = {}, freeCnt = {};
    } mem, dma;                 // CyU3PMemGetCounts(), CyU3PBufGetCounts()
    UsbErr err_cur, err_tot;    // CyU3PUsbGetErrorCounts
    uint8_t memCheck = {}, dmaCheck = {}; // CyU3PMemCorruptionCheck(), CyU3PBufCorruptionCheck()
    struct{
        bool sfp_active : 1 = {};    // there's an active module plugged into SFP+ cage
        bool res : 7;
        // a reported I2C bus address of 0 means "not present or not accessible/configurable"
        uint8_t i2c_pll = {};        // 8-bit I2C bus address of PLL clock
        uint8_t i2c_exp = {};        // 8-bit I2C bus address of I2C expander
        uint8_t i2c_fpga = {};       // 8-bit I2C bus address of FPGA
        uint8_t i2c_img = {};        // 8-bit I2C bus address of image sensor
        uint8_t i2c_fan = {};        // 8-bit I2C bus address of fan controller
        uint8_t i2c_sdi = {};        // 8-bit I2C bus address of SDI dedicated output
        uint8_t i2c_audio = {};      // 8-bit I2C bus address of audio chip
        uint8_t i2c_res0 = {};
        uint8_t i2c_res1 = {};
        uint8_t i2c_res2 = {};
        uint8_t i2c_res3 = {};
        uint8_t i2c_res4 = {};
        uint8_t i2c_res5 = {};
        uint8_t i2c_res6 = {};
        uint8_t i2c_res7 = {};
    } peripherals;
};
static_assert(sizeof(SysInfoV2) == 54);
 
// --------------------------------------------
#pragma pack(pop)
// --------------------------------------------

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information