|
LMS API Documentation v23.11.0
|
Topics | |
| Board parameter | |
| Clock definitions | |
Functions | |
| API_EXPORT int CALL_CONV | LMS_Reset (lms_device_t *device) |
| API_EXPORT int CALL_CONV | LMS_ReadLMSReg (lms_device_t *device, uint32_t address, uint16_t *val) |
| API_EXPORT int CALL_CONV | LMS_WriteLMSReg (lms_device_t *device, uint32_t address, uint16_t val) |
| API_EXPORT int CALL_CONV | LMS_ReadParam (lms_device_t *device, struct LMS7Parameter param, uint16_t *val) |
| API_EXPORT int CALL_CONV | LMS_WriteParam (lms_device_t *device, struct LMS7Parameter param, uint16_t val) |
| API_EXPORT int CALL_CONV | LMS_ReadFPGAReg (lms_device_t *device, uint32_t address, uint16_t *val) |
| API_EXPORT int CALL_CONV | LMS_WriteFPGAReg (lms_device_t *device, uint32_t address, uint16_t val) |
| API_EXPORT int CALL_CONV | LMS_ReadCustomBoardParam (lms_device_t *device, uint8_t id, float_type *val, lms_name_t units) |
| API_EXPORT int CALL_CONV | LMS_WriteCustomBoardParam (lms_device_t *device, uint8_t id, float_type val, const lms_name_t units) |
| API_EXPORT int CALL_CONV | LMS_GetClockFreq (lms_device_t *dev, size_t clk_id, float_type *freq) |
| API_EXPORT int CALL_CONV | LMS_SetClockFreq (lms_device_t *dev, size_t clk_id, float_type freq) |
| API_EXPORT int CALL_CONV | LMS_VCTCXOWrite (lms_device_t *dev, uint16_t val) |
| API_EXPORT int CALL_CONV | LMS_VCTCXORead (lms_device_t *dev, uint16_t *val) |
| API_EXPORT int CALL_CONV | LMS_Synchronize (lms_device_t *dev, bool toChip) |
| API_EXPORT int CALL_CONV | LMS_GPIORead (lms_device_t *dev, uint8_t *buffer, size_t len) |
| API_EXPORT int CALL_CONV | LMS_GPIOWrite (lms_device_t *dev, const uint8_t *buffer, size_t len) |
| API_EXPORT int CALL_CONV | LMS_GPIODirRead (lms_device_t *dev, uint8_t *buffer, size_t len) |
| API_EXPORT int CALL_CONV | LMS_GPIODirWrite (lms_device_t *dev, const uint8_t *buffer, size_t len) |
The functions in this section provide a low access to device such as modifying device internal register or clock frequency. Low-Level functions can be used to configure device entirely, however a more practical use is to fine-tune device settings after configuring it with /ref FN_HIGH_LVL.
| API_EXPORT int CALL_CONV LMS_GetClockFreq | ( | lms_device_t * | dev, |
| size_t | clk_id, | ||
| float_type * | freq ) |
Get frequency of the specified clock.
| dev | Device handle previously obtained by LMS_Open(). |
| clk_id | Clock identifier (Clock definitions) |
| freq | Clock frequency in Hz |
| API_EXPORT int CALL_CONV LMS_GPIODirRead | ( | lms_device_t * | dev, |
| uint8_t * | buffer, | ||
| size_t | len ) |
| dev | Device handle previously obtained by LMS_Open(). | |
| [out] | buffer | GPIO direction configuration(8 GPIO per byte, LSB first; 0 input, 1 output) |
| len | number of bytes to read |
| API_EXPORT int CALL_CONV LMS_GPIODirWrite | ( | lms_device_t * | dev, |
| const uint8_t * | buffer, | ||
| size_t | len ) |
| dev | Device handle previously obtained by LMS_Open(). | |
| [in] | buffer | GPIO direction configuration(8 GPIO per byte, LSB first; 0 input, 1 output) |
| len | number of bytes to write |
| API_EXPORT int CALL_CONV LMS_GPIORead | ( | lms_device_t * | dev, |
| uint8_t * | buffer, | ||
| size_t | len ) |
| dev | Device handle previously obtained by LMS_Open(). | |
| [in] | buffer | read values (8 GPIO values per byte, LSB first) |
| len | number of bytes to read |
| API_EXPORT int CALL_CONV LMS_GPIOWrite | ( | lms_device_t * | dev, |
| const uint8_t * | buffer, | ||
| size_t | len ) |
| dev | Device handle previously obtained by LMS_Open(). | |
| [out] | buffer | values to write (8 GPIO values per byte, LSB first) |
| len | number of bytes to write |
| API_EXPORT int CALL_CONV LMS_ReadCustomBoardParam | ( | lms_device_t * | device, |
| uint8_t | id, | ||
| float_type * | val, | ||
| lms_name_t | units ) |
Read custom parameter from board
| device | Device handle previously obtained by LMS_Open(). |
| id | Parameter identifier (Board parameter) |
| val | Current register value |
| units | [optional] measurement units of parameter if available |
| API_EXPORT int CALL_CONV LMS_ReadFPGAReg | ( | lms_device_t * | device, |
| uint32_t | address, | ||
| uint16_t * | val ) |
Read device FPGA register
| device | Device handle previously obtained by LMS_Open(). |
| address | Register address |
| val | Current register value |
| API_EXPORT int CALL_CONV LMS_ReadLMSReg | ( | lms_device_t * | device, |
| uint32_t | address, | ||
| uint16_t * | val ) |
Read device LMS chip register
| device | Device handle previously obtained by LMS_Open(). |
| address | Register address |
| val | Current register value |
| API_EXPORT int CALL_CONV LMS_ReadParam | ( | lms_device_t * | device, |
| struct LMS7Parameter | param, | ||
| uint16_t * | val ) |
Read device parameter. Parameter defines specific bits in device register.
| device | Device handle previously obtained by LMS_Open(). |
| param | Parameter. |
| val | Current parameter value. |
| API_EXPORT int CALL_CONV LMS_Reset | ( | lms_device_t * | device | ) |
Send Reset signal to LMS chip. This initializes LMS chip with default configuration as described in LMS chip datasheet.
| device | Device handle previously obtained by LMS_Open(). |
| API_EXPORT int CALL_CONV LMS_SetClockFreq | ( | lms_device_t * | dev, |
| size_t | clk_id, | ||
| float_type | freq ) |
Set frequency of the specified clock
| dev | Device handle previously obtained by LMS_Open(). |
| clk_id | Clock identifier (Clock definitions) |
| freq | Clock frequency in Hz. Pass zero or negative value to only perform tune (if supported) without recalculating values |
| API_EXPORT int CALL_CONV LMS_Synchronize | ( | lms_device_t * | dev, |
| bool | toChip ) |
Synchronizes register values between API cache and chip
| dev | Device handle previously obtained by LMS_Open(). |
| toChip | if true copies values from API cache to chip. |
| API_EXPORT int CALL_CONV LMS_VCTCXORead | ( | lms_device_t * | dev, |
| uint16_t * | val ) |
Read VCTCXO trim DAC value from non-volatile storage. Returned value is value that is loaded on power-on and may different from current runtime value.
| [in] | dev | Device handle previously obtained by LMS_Open(). |
| [out] | val | VCTCXO trim DAC value |
| API_EXPORT int CALL_CONV LMS_VCTCXOWrite | ( | lms_device_t * | dev, |
| uint16_t | val ) |
Write value to VCTCXO trim DAC. Used to adjust/calibrate reference clock generated by voltage controlled oscillator. Value is written to non-volatile storage.
| dev | Device handle previously obtained by LMS_Open(). |
| val | Value to write to VCTCXO trim DAC |
| API_EXPORT int CALL_CONV LMS_WriteCustomBoardParam | ( | lms_device_t * | device, |
| uint8_t | id, | ||
| float_type | val, | ||
| const lms_name_t | units ) |
Write custom parameter from board
| device | Device handle previously obtained by LMS_Open(). | |
| id | Parameter identifier (Board parameter) | |
| [out] | val | Value to write |
| [out] | units | [optional] measurement units of parameter if available |
| API_EXPORT int CALL_CONV LMS_WriteFPGAReg | ( | lms_device_t * | device, |
| uint32_t | address, | ||
| uint16_t | val ) |
Write device FPGA register
| device | Device handle previously obtained by LMS_Open(). |
| address | Register address |
| val | Value to write |
| API_EXPORT int CALL_CONV LMS_WriteLMSReg | ( | lms_device_t * | device, |
| uint32_t | address, | ||
| uint16_t | val ) |
Write device LMS chip register
| device | Device handle previously obtained by LMS_Open(). |
| address | Register address |
| val | Value to write |
| API_EXPORT int CALL_CONV LMS_WriteParam | ( | lms_device_t * | device, |
| struct LMS7Parameter | param, | ||
| uint16_t | val ) |
Write device parameter. Parameter defines specific bits in device register.
| device | Device handle previously obtained by LMS_Open(). |
| param | Parameter. |
| val | Parameter value to write |