You are here

Hardware Type

DLN series include a number of different devices. All these devices support API described in the current manual, but their available functionality may slightly differ. For example, they can support different SPI and I2C bus frequencies, not all of the adapters implement I2C/SPI slave interfaces, etc.

If you know that your application needs a specific DLN-series device, you can check the hardware type of the adapter by calling the DlnGetHardwareType() function. The hardware type constants are defined in the dln_generic.h file as follows:

C/C++
#define
DLN_HW_TYPE uint32_t
#define DLN_HW_TYPE_DLN5  ((DLN_HW_TYPE)0x0500)
#define DLN_HW_TYPE_DLN4M ((DLN_HW_TYPE)0x0401)
#define DLN_HW_TYPE_DLN4S ((DLN_HW_TYPE)0x0402)
#define DLN_HW_TYPE_DLN3  ((DLN_HW_TYPE)0x0300)
#define DLN_HW_TYPE_DLN2  ((DLN_HW_TYPE)0x0200)
#define DLN_HW_TYPE_DLN1  ((DLN_HW_TYPE)0x0100)

You can use the DlnOpenDeviceByHwType() function to open the adapter with the predefined hardware type.

Instead of checking the specific device type, you can check if the adapter implements the required functionality. DLN API provides you with a number of ways to do this.

Rating: 
Average: 4.6 (83 votes)

User login