Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
code:sub2r-lib [2022/08/30 18:45] – [Sample code] Igor Yefmov | code:sub2r-lib [2022/09/10 20:39] (current) – [Basic "vendor request" call] Igor Yefmov | ||
---|---|---|---|
Line 11: | Line 11: | ||
===== Basic " | ===== Basic " | ||
+ | |||
+ | SUB2r API calls are implemented as USB " | ||
Sample usage: | Sample usage: | ||
Line 19: | Line 21: | ||
array< | array< | ||
const auto rc{m_fx3.vrCmd(Fx3Cmd:: | const auto rc{m_fx3.vrCmd(Fx3Cmd:: | ||
- | | + | |
- | , 0 | + | , 0 |
- | , 0 | + | , 0 |
- | , vi)}; | + | , vi)}; |
return vi; // 32 bits of the " | return vi; // 32 bits of the " | ||
} | } | ||
Line 357: | Line 359: | ||
| <code c++> | | <code c++> | ||
| <code c++> | | <code c++> | ||
- | |||
- | |||
- | ==== UFix_8_8 ==== | ||
- | {{ : | ||
- | |||
- | A helper class for working with a 2-byte floating number format used to specify fractional parameters for the FX3. More details are available in [[code: | ||
- | |||
- | ^ Method ^ Signature ^ Functionality ^ | ||
- | | '' | ||
- | UFix_8_8( | ||
- | uint8_t _i | ||
- | , uint8_t _f = 0 | ||
- | ) noexcept</ | ||
- | | '' | ||
- | UFix_8_8(double _d) | ||
- | noexcept;</ | ||
- | | '' | ||
- | gsl:: | ||
- | ) noexcept;</ | ||
- | | '' | ||
- | operator double() const | ||
- | noexcept;</ | ||
- | | '' | ||
- | operator uint16_t() const | ||
- | noexcept;</ | ||
- | uint8_t valI{1}, valF{128}; | ||
- | auto val{S2R:: | ||
- | S2R::I2C dev; | ||
- | // a port to set the image adjustment auto- | ||
- | // functions' | ||
- | constexpr uint8_t port{0xDF}; | ||
- | dev.vrCmd(port, | ||
- | </ | ||