Data Structures | |
struct | device_descriptor_type2_t |
Structure holding device descriptor 2 (easy channel information) More... | |
struct | property_description_t |
Structure holding a property description. More... | |
struct | ext_property_description_t |
Structure holding a extended property description. More... | |
struct | system_network_param_read_t |
Structure holding individual address and test info and test result for the SystemNetworkParameterRead service. More... | |
struct | domain_addr_prog_mode_read_t |
Structure holding individual address, serial number, domain address for the DomainAddressProgModeRead service. More... | |
Typedefs | |
typedef struct device_descriptor_type2_t | device_descriptor_type2_t |
Structure holding device descriptor 2 (easy channel information) More... | |
typedef struct property_description_t | property_description_t |
Structure holding a property description. More... | |
typedef struct ext_property_description_t | ext_property_description_t |
Structure holding a extended property description. More... | |
typedef struct system_network_param_read_t | system_network_param_read_t |
Structure holding individual address and test info and test result for the SystemNetworkParameterRead service. More... | |
typedef struct domain_addr_prog_mode_read_t | domain_addr_prog_mode_read_t |
Structure holding individual address, serial number, domain address for the DomainAddressProgModeRead service. More... | |
Functions | |
kdriveExpress_API int32_t | kdrive_sp_create (int32_t ap) |
Creates an internal ServicePort interface This should be the first function called when working with the services library. More... | |
kdriveExpress_API bool_t | kdrive_sp_release (int32_t sp) |
Releases the ServicePort interface. More... | |
kdriveExpress_API error_t | kdrive_sp_set_response_timeout (int32_t sp, uint32_t timeout) |
Sets the response timeout. More... | |
kdriveExpress_API error_t | kdrive_sp_get_response_timeout (int32_t sp, uint32_t *timeout) |
Gets the response timeout. More... | |
kdriveExpress_API error_t | kdrive_sp_set_co (int32_t sp, bool_t connection_oriented) |
Sets whether the device services are run as connection-oriented or connection-less. More... | |
kdriveExpress_API bool_t | kdrive_sp_is_co (int32_t sp) |
Returns whether the device services are run as connection-oriented or connection-less. More... | |
kdriveExpress_API error_t | kdrive_sp_set_max_apdu_length (int32_t sp, uint32_t max_apdu_length) |
Sets the maximum apdu length for device services. More... | |
kdriveExpress_API error_t | kdrive_sp_get_max_apdu_length (int32_t sp, uint32_t *max_apdu_length) |
Gets the maximum apdu length for device services. More... | |
kdriveExpress_API error_t | kdrive_sp_set_ext_memory_services_used (int32_t sp, bool_t ext_used) |
Sets whether the memory block services use the (new) extended memory services or the 'normal' memory service. More... | |
kdriveExpress_API error_t | kdrive_sp_are_ext_memory_services_used (int32_t sp, bool_t *ext_used) |
Gets whether the memory block services are use the (new) extended memory services or the 'normal' memory service. More... | |
kdriveExpress_API error_t | kdrive_sp_device_descriptor_type0_read (int32_t sp, uint16_t ind_addr, uint16_t *mask_version) |
Reads device descriptor 0 (mask version) from a device. More... | |
kdriveExpress_API error_t | kdrive_sp_device_descriptor_type2_read (int32_t sp, uint16_t ind_addr, device_descriptor_type2_t *desc) |
Reads device descriptor 2 (easy channel information) from a device. More... | |
kdriveExpress_API error_t | kdrive_sp_restart_device_type0 (int32_t sp, uint16_t ind_addr) |
Restarts the device using restart (type 0) There is no response to this telegram so it is not possible to know when the device is ready. More... | |
kdriveExpress_API error_t | kdrive_sp_restart_device_type1 (int32_t sp, uint16_t ind_addr, uint8_t erase_code, uint8_t channel_number, uint8_t *error_code, uint16_t *process_time) |
Restarts the device using restart (type 1) More... | |
kdriveExpress_API error_t | kdrive_sp_property_description_read (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t prop_index, property_description_t *property_description) |
Reads a property description from a device. More... | |
kdriveExpress_API error_t | kdrive_sp_prop_value_read (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t nr_of_elems, uint16_t start_index, uint8_t data[], uint32_t *data_length) |
Reads a property value from a device The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the property value to be read. More... | |
kdriveExpress_API error_t | kdrive_sp_prop_value_write (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t data[], uint32_t data_length) |
Writes the value of a property to a device. More... | |
kdriveExpress_API error_t | kdrive_sp_prop_value_write_without_verify (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t input_data[], uint32_t input_data_length, uint8_t output_data[], uint32_t *output_data_length) |
Writes the value of a property to a device. More... | |
kdriveExpress_API error_t | kdrive_sp_function_property_command (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, const uint8_t input_data[], uint32_t input_data_length, uint8_t *return_code, uint8_t output_data[], uint32_t *output_data_length) |
Calls a function property of an interface object in a device. More... | |
kdriveExpress_API error_t | kdrive_sp_function_property_state_read (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t prop_id, const uint8_t input_data[], uint32_t input_data_length, uint8_t *return_code, uint8_t output_data[], uint32_t *output_data_length) |
Calls a function property of an interface object in a device. More... | |
kdriveExpress_API error_t | kdrive_sp_ext_prop_description_read (int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint16_t prop_index, ext_property_description_t *property_description) |
Reads a property description from a device via A_PropertyExtDescription_Read service. More... | |
kdriveExpress_API error_t | kdrive_sp_ext_prop_value_read (int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint8_t nr_of_elems, uint16_t start_index, uint8_t data[], uint32_t *data_length) |
kdriveExpress_API error_t | kdrive_sp_ext_prop_value_write (int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t data[], uint32_t data_length, uint8_t *return_code) |
kdriveExpress_API error_t | kdrive_sp_ext_prop_value_write_uncon (int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, uint8_t nr_of_elems, uint16_t start_index, const uint8_t data[], uint32_t data_length) |
kdriveExpress_API error_t | kdrive_sp_ext_function_property_command (int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, const uint8_t input_data[], uint32_t input_data_length, uint8_t *return_code, uint8_t output_data[], uint32_t *output_data_length) |
kdriveExpress_API error_t | kdrive_sp_ext_function_property_state_read (int32_t sp, uint16_t ind_addr, uint16_t object_type, uint16_t object_instance, uint16_t prop_id, const uint8_t input_data[], uint32_t input_data_length, uint8_t *return_code, uint8_t output_data[], uint32_t *output_data_length) |
kdriveExpress_API error_t | kdrive_sp_memory_read (int32_t sp, uint16_t ind_addr, uint16_t memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length) |
Reads data via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_memory_write (int32_t sp, uint16_t ind_addr, uint16_t memory_addr, const uint8_t data[], uint32_t data_length) |
Writes data via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_memory_write_without_verify (int32_t sp, uint16_t ind_addr, uint16_t memory_addr, const uint8_t input_data[], uint32_t input_data_length, uint8_t output_data[], uint32_t *output_data_length) |
Writes data via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_user_memory_read (int32_t sp, uint16_t ind_addr, uint32_t memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length) |
Reads data via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_user_memory_write (int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t data[], uint32_t data_length) |
Writes data via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_user_memory_write_without_verify (int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t input_data[], uint32_t input_data_length, uint8_t output_data[], uint32_t *output_data_length) |
Writes data via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_ext_memory_read (int32_t sp, uint16_t ind_addr, uint32_t memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length) |
Reads data via A_Extended_Memory_Read service. More... | |
kdriveExpress_API error_t | kdrive_sp_ext_memory_write (int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t data[], uint32_t data_length) |
Reads data via A_Extended_Memory_Write service. More... | |
kdriveExpress_API error_t | kdrive_sp_authorize_request (int32_t sp, uint16_t ind_addr, uint32_t key, uint8_t *level) |
Sends an authorize request. More... | |
kdriveExpress_API error_t | kdrive_sp_key_write (int32_t sp, uint16_t ind_addr, uint8_t *level, uint32_t key) |
Writes an authorization key. More... | |
kdriveExpress_API error_t | kdrive_is_ind_addr_free (int32_t sp, uint16_t ind_addr, bool_t *is_free) |
Checks if the given individual address is free (not used by a device on the bus) More... | |
kdriveExpress_API error_t | kdrive_sp_load_state_read (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t *load_state) |
Reads the load state via PropertyValueRead (PID_LOAD_STATE_CONTROL). More... | |
kdriveExpress_API error_t | kdrive_sp_load_state_write (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t load_event, uint8_t *load_state) |
Writes the load state via PropertyValueWrite (PID_LOAD_STATE_CONTROL). More... | |
kdriveExpress_API error_t | kdrive_sp_load_state_write_ex (int32_t sp, uint16_t ind_addr, uint8_t object_index, uint8_t load_event, const uint8_t additional_info[KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN], uint8_t *load_state) |
Writes the load state via PropertyValueWrite (PID_LOAD_STATE_CONTROL). More... | |
kdriveExpress_API error_t | kdrive_sp_read_prog_mode (int32_t sp, uint16_t ind_addr, bool_t *enabled) |
Reads the current programming mode. More... | |
kdriveExpress_API error_t | kdrive_sp_read_prog_mode_mask_based (int32_t sp, uint16_t ind_addr, uint16_t mask_version, bool_t *enabled) |
Reads the current programming mode. More... | |
kdriveExpress_API error_t | kdrive_sp_read_prog_mode_property_based (int32_t sp, uint16_t ind_addr, bool_t *enabled) |
Reads the current programming mode via PropertyValueRead. More... | |
kdriveExpress_API error_t | kdrive_sp_read_prog_mode_memory_mapped (int32_t sp, uint16_t ind_addr, bool_t *enabled) |
Reads the current programming mode via MemoryRead. More... | |
kdriveExpress_API error_t | kdrive_sp_switch_prog_mode (int32_t sp, uint16_t ind_addr, bool_t enable) |
Enable / Disable the programming mode (switches the learn LED). More... | |
kdriveExpress_API error_t | kdrive_sp_switch_prog_mode_mask_based (int32_t sp, uint16_t ind_addr, uint16_t mask_version, bool_t enable) |
Enable / Disable the programming mode (switches the learn LED). More... | |
kdriveExpress_API error_t | kdrive_sp_switch_prog_mode_property_based (int32_t sp, uint16_t ind_addr, bool_t enable) |
Enable / Disable the programming mode (switches the learn LED). More... | |
kdriveExpress_API error_t | kdrive_sp_switch_prog_mode_memory_mapped (int32_t sp, uint16_t ind_addr, bool_t enable) |
Enable / Disable the programming mode (switches the learn LED). More... | |
kdriveExpress_API error_t | kdrive_sp_memory_block_read (int32_t sp, uint16_t ind_addr, uint32_t *memory_addr, uint8_t number, uint8_t data[], uint32_t *data_length) |
Reads a contiguous memory block via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_memory_block_write (int32_t sp, uint16_t ind_addr, uint32_t memory_addr, const uint8_t data[], uint32_t data_length) |
Writes a contiguous memory block via DMA. More... | |
kdriveExpress_API error_t | kdrive_sp_ind_addr_prog_mode_read (int32_t sp, uint32_t wait_time, uint16_t data[], uint32_t *data_length) |
Reads the individual addresses of devices in Programming Mode (i.e. More... | |
kdriveExpress_API error_t | kdrive_sp_ind_addr_prog_mode_write (int32_t sp, uint16_t new_ind_addr) |
Writes the specified individual address to a device in Programming Mode (i.e. More... | |
kdriveExpress_API error_t | kdrive_sp_ind_addr_sn_read (int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], uint16_t *ind_addr) |
Reads the individual address of a device that matches the specified Serial Number. More... | |
kdriveExpress_API error_t | kdrive_sp_ind_addr_sn_write (int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], uint16_t new_ind_addr) |
Writes the individual address of a device that matches the specified Serial Number. More... | |
kdriveExpress_API error_t | kdrive_sp_network_param_write_broadcast (int32_t sp, uint16_t object_type, uint8_t prop_id, const uint8_t data[], uint32_t data_length) |
Writes a parameter with the NetworkParameterWriteBroadcast service. More... | |
kdriveExpress_API error_t | kdrive_sp_network_param_write_systembroadcast (int32_t sp, uint16_t object_type, uint8_t prop_id, const uint8_t data[], uint32_t data_length) |
Writes a parameter with the NetworkParameterWriteBroadcast service. More... | |
kdriveExpress_API error_t | kdrive_sp_system_network_param_write (int32_t sp, uint16_t object_type, uint16_t prop_id, const uint8_t data[], uint32_t data_length) |
Writes a system parameter with the SystemNetworkParameterWrite service. More... | |
kdriveExpress_API error_t | kdrive_sp_system_network_param_read (int32_t sp, uint16_t object_type, uint16_t prop_id, const uint8_t data[], uint32_t data_length, uint32_t wait_time, system_network_param_read_t items[], uint32_t *items_length) |
Reads system parameter with the SystemNetworkParameterRead service. More... | |
kdriveExpress_API error_t | kdrive_sp_domain_addr_prog_mode_read (int32_t sp, uint32_t wait_time, domain_addr_prog_mode_read_t items[], uint32_t *items_length) |
Reads the Domain Addresses of devices in Programming Mode (i.e. More... | |
kdriveExpress_API error_t | kdrive_sp_domain_addr_prog_mode_write (int32_t sp, const uint8_t da[KDRIVE_DA_LEN]) |
Writes the Domain Address to a device in Programming Mode (i.e. More... | |
kdriveExpress_API error_t | kdrive_sp_domain_addr_sn_read (int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], uint16_t *ind_addr, uint8_t da[KDRIVE_DA_LEN]) |
Reads the Domain Address of a device that matches the specified Serial Number. More... | |
kdriveExpress_API error_t | kdrive_sp_domain_addr_sn_write (int32_t sp, const uint8_t sn[KDRIVE_SN_LEN], const uint8_t da[KDRIVE_DA_LEN]) |
Writes the Domain Address of a device This function validates that the domain address was successfully written. More... | |
typedef struct device_descriptor_type2_t device_descriptor_type2_t |
Structure holding device descriptor 2 (easy channel information)
typedef struct domain_addr_prog_mode_read_t domain_addr_prog_mode_read_t |
Structure holding individual address, serial number, domain address for the DomainAddressProgModeRead service.
The service returns 0 or more of these tuples.
typedef struct ext_property_description_t ext_property_description_t |
Structure holding a extended property description.
typedef struct property_description_t property_description_t |
Structure holding a property description.
typedef struct system_network_param_read_t system_network_param_read_t |
Structure holding individual address and test info and test result for the SystemNetworkParameterRead service.
The service returns 0 or more of these tuples.
kdriveExpress_API error_t kdrive_is_ind_addr_free | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t * | is_free | ||
) |
Checks if the given individual address is free (not used by a device on the bus)
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[out] | is_free | 1 when the address is not used otherwise 0 |
kdriveExpress_API error_t kdrive_sp_are_ext_memory_services_used | ( | int32_t | sp, |
bool_t * | ext_used | ||
) |
Gets whether the memory block services are use the (new) extended memory services or the 'normal' memory service.
[in] | sp | the service port descriptor |
[out] | ext_used | are the extended memory services |
kdriveExpress_API error_t kdrive_sp_authorize_request | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | key, | ||
uint8_t * | level | ||
) |
Sends an authorize request.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | key | authorize key |
[out] | level | access level |
kdriveExpress_API int32_t kdrive_sp_create | ( | int32_t | ap | ) |
Creates an internal ServicePort interface This should be the first function called when working with the services library.
It creates a unique service port descriptor which will be passed to all kdrive services functions. When finished, call kdrive_sp_release. If create fails the function returns KDRIVE_INVALID_DESCRIPTOR
[in] | ap | the access port descriptor |
kdriveExpress_API error_t kdrive_sp_device_descriptor_type0_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t * | mask_version | ||
) |
Reads device descriptor 0 (mask version) from a device.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[out] | mask_version | mask version |
kdriveExpress_API error_t kdrive_sp_device_descriptor_type2_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
device_descriptor_type2_t * | desc | ||
) |
Reads device descriptor 2 (easy channel information) from a device.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[out] | desc | struct with the data from the device descriptor 2 |
kdriveExpress_API error_t kdrive_sp_domain_addr_prog_mode_read | ( | int32_t | sp, |
uint32_t | wait_time, | ||
domain_addr_prog_mode_read_t | items[], | ||
uint32_t * | items_length | ||
) |
Reads the Domain Addresses of devices in Programming Mode (i.e.
with the Learn LED enabled)
[in] | sp | the service port descriptor |
[in] | wait_time | the time to wait in milliseconds for all responses, i.e. 500ms or so |
[out] | items | the array of (individual address, serial number, domain address) items generated by the service |
[in,out] | items_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_domain_addr_prog_mode_write | ( | int32_t | sp, |
const uint8_t | da[KDRIVE_DA_LEN] | ||
) |
Writes the Domain Address to a device in Programming Mode (i.e.
with the Learn LED enabled) This function validates that there is only one device in programming mode and verifies that the domain address was successfully written
[in] | sp | the service port descriptor |
[in] | da | the new domain address |
kdriveExpress_API error_t kdrive_sp_domain_addr_sn_read | ( | int32_t | sp, |
const uint8_t | sn[KDRIVE_SN_LEN], | ||
uint16_t * | ind_addr, | ||
uint8_t | da[KDRIVE_DA_LEN] | ||
) |
Reads the Domain Address of a device that matches the specified Serial Number.
[in] | sp | the service port descriptor |
[in] | sn | the serial number |
[out] | ind_addr | the individual address read from the device |
[out] | da | the domain address read from the device |
kdriveExpress_API error_t kdrive_sp_domain_addr_sn_write | ( | int32_t | sp, |
const uint8_t | sn[KDRIVE_SN_LEN], | ||
const uint8_t | da[KDRIVE_DA_LEN] | ||
) |
Writes the Domain Address of a device This function validates that the domain address was successfully written.
[in] | sp | the service port descriptor |
[in] | sn | the serial number |
[in] | da | the domain address read from the device |
kdriveExpress_API error_t kdrive_sp_ext_function_property_command | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | object_type, | ||
uint16_t | object_instance, | ||
uint16_t | prop_id, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t * | return_code, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Calls a function property of an interface object in a device via A_FunctionPropertyExt_Command service. The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the function response. The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response. \note Only available in the Commercial kdriveExpress SDK \param [in] sp the service port descriptor \param [in] ind_addr individual address \param [in] object_type object type
[in] | object_instance | object instance |
[in] | prop_id | property id |
[in] | input_data | the function specific input data |
[in] | input_data_length | the length of the input_data array |
[out] | return_code | return code |
[out] | output_data | the function specific output data |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |
kdriveExpress_API error_t kdrive_sp_ext_function_property_state_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | object_type, | ||
uint16_t | object_instance, | ||
uint16_t | prop_id, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t * | return_code, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Calls a function property of an interface object in a device via A_FunctionPropertyExt_StateRead service. The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the function response. The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response. \note Only available in the Commercial kdriveExpress SDK \param [in] sp the service port descriptor \param [in] ind_addr individual address
[in] | object_type | object type |
[in] | object_instance | object instance |
[in] | prop_id | property id |
[in] | input_data | the function specific input data |
[in] | input_data_length | the length of the input_data array |
[out] | return_code | return code |
[out] | output_data | the function specific output data |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |
kdriveExpress_API error_t kdrive_sp_ext_memory_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | memory_addr, | ||
uint8_t | number, | ||
uint8_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads data via A_Extended_Memory_Read service.
The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the property value to be read. The max size of the buffer must be passed in as data_length. data_length will be updated to correspond to the length of the value read.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | number | number of octet to be read |
[out] | data | the memory data read from the device |
[in,out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_ext_memory_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | memory_addr, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Reads data via A_Extended_Memory_Write service.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | data | the data array |
[in] | data_length | the length of the data array |
kdriveExpress_API error_t kdrive_sp_ext_prop_description_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | object_type, | ||
uint16_t | object_instance, | ||
uint16_t | prop_id, | ||
uint16_t | prop_index, | ||
ext_property_description_t * | property_description | ||
) |
Reads a property description from a device via A_PropertyExtDescription_Read service.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_type | object type |
[in] | object_instance | object instance |
[in] | prop_id | property id |
[in] | prop_index | property index |
[out] | property_description | property description (write enabled, read level, ...) |
kdriveExpress_API error_t kdrive_sp_ext_prop_value_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | object_type, | ||
uint16_t | object_instance, | ||
uint16_t | prop_id, | ||
uint8_t | nr_of_elems, | ||
uint16_t | start_index, | ||
uint8_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads a property value from a device via A_PropertyExtValue_Read service. The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the property value to be read. The max size of the buffer must be passed in as data_length. data_length will be updated to correspond to the length of the value read. \note Only available in the Commercial kdriveExpress SDK \param [in] sp the service port descriptor \param [in] ind_addr individual address \param [in] object_type object type
[in] | object_instance | object instance |
[in] | prop_id | Property ID |
[in] | nr_of_elems | Element Count |
[in] | start_index | Start Index |
[out] | data | the property value read from the device |
[in,out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_ext_prop_value_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | object_type, | ||
uint16_t | object_instance, | ||
uint16_t | prop_id, | ||
uint8_t | nr_of_elems, | ||
uint16_t | start_index, | ||
const uint8_t | data[], | ||
uint32_t | data_length, | ||
uint8_t * | return_code | ||
) |
Writes the value of a property to a device via A_PropertyExtValue_Write_Con service. This service waits for the response. \note Only available in the Commercial kdriveExpress SDK \param [in] sp the service port descriptor \param [in] ind_addr individual address \param [in] object_type object type
[in] | object_instance | object instance |
[in] | prop_id | property id |
[in] | nr_of_elems | element count |
[in] | start_index | start index |
[in] | data | the data array |
[in] | data_length | the length of the data array |
[out] | return_code | the return code from the device |
kdriveExpress_API error_t kdrive_sp_ext_prop_value_write_uncon | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | object_type, | ||
uint16_t | object_instance, | ||
uint16_t | prop_id, | ||
uint8_t | nr_of_elems, | ||
uint16_t | start_index, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes the value of a property to a device via A_PropertyExtValue_Write_UnCon service. This service do not wait for a response. \note Only available in the Commercial kdriveExpress SDK \param [in] sp the service port descriptor \param [in] ind_addr individual address \param [in] object_type object type
[in] | object_instance | object instance |
[in] | prop_id | property id |
[in] | nr_of_elems | element count |
[in] | start_index | start index |
[in] | data | the data array |
[in] | data_length | the length of the data array |
kdriveExpress_API error_t kdrive_sp_function_property_command | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | prop_id, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t * | return_code, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Calls a function property of an interface object in a device.
The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the function response. The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | prop_id | property id |
[in] | input_data | the function specific input data |
[in] | input_data_length | the length of the input_data array |
[out] | return_code | return code |
[out] | output_data | the function specific output data |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |
kdriveExpress_API error_t kdrive_sp_function_property_state_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | prop_id, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t * | return_code, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Calls a function property of an interface object in a device.
The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the function response. The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | prop_id | property id |
[in] | input_data | the function specific input data |
[in] | input_data_length | the length of the input_data array |
[out] | return_code | return code |
[out] | output_data | the function specific output data |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |
kdriveExpress_API error_t kdrive_sp_get_max_apdu_length | ( | int32_t | sp, |
uint32_t * | max_apdu_length | ||
) |
Gets the maximum apdu length for device services.
[in] | sp | the service port descriptor |
[out] | max_apdu_length | the set device services maximum apdu length |
kdriveExpress_API error_t kdrive_sp_get_response_timeout | ( | int32_t | sp, |
uint32_t * | timeout | ||
) |
Gets the response timeout.
[in] | sp | the service port descriptor |
[out] | timeout | response timeout in ms. 0 means use service specific default timeout |
kdriveExpress_API error_t kdrive_sp_ind_addr_prog_mode_read | ( | int32_t | sp, |
uint32_t | wait_time, | ||
uint16_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads the individual addresses of devices in Programming Mode (i.e.
with the Learn LED enabled) The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the number of individual addresses to be read. The max number of elements in data (its capacity) must be passed in as data_length. data_length will be updated to correspond to the actual number of elements written.
[in] | sp | the service port descriptor |
[in] | wait_time | the time to wait in milliseconds for all responses, i.e. 500ms or so |
[out] | data | the array of individual addresses generated by the service |
[in,out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_ind_addr_prog_mode_write | ( | int32_t | sp, |
uint16_t | new_ind_addr | ||
) |
Writes the specified individual address to a device in Programming Mode (i.e.
with the Learn LED enabled) This function validates that there is only one device in programming mode and verifies that the individual address was successfully written
[in] | sp | the service port descriptor |
[in] | new_ind_addr | the individual address that is written to the device |
kdriveExpress_API error_t kdrive_sp_ind_addr_sn_read | ( | int32_t | sp, |
const uint8_t | sn[KDRIVE_SN_LEN], | ||
uint16_t * | ind_addr | ||
) |
Reads the individual address of a device that matches the specified Serial Number.
[in] | sp | the service port descriptor |
[in] | sn | the KNX Serial Number of the device to be addressed |
[out] | ind_addr | the individual address (if found) of the corresponding device |
kdriveExpress_API error_t kdrive_sp_ind_addr_sn_write | ( | int32_t | sp, |
const uint8_t | sn[KDRIVE_SN_LEN], | ||
uint16_t | new_ind_addr | ||
) |
Writes the individual address of a device that matches the specified Serial Number.
[in] | sp | the service port descriptor |
[in] | sn | the KNX Serial Number of the device to be addressed |
[in] | new_ind_addr | the individual address that is written to the device |
kdriveExpress_API bool_t kdrive_sp_is_co | ( | int32_t | sp | ) |
Returns whether the device services are run as connection-oriented or connection-less.
If there is an error, i.e. the service port sp doesn't exist the function will return 0.
[in] | sp | the service port descriptor |
kdriveExpress_API error_t kdrive_sp_key_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t * | level, | ||
uint32_t | key | ||
) |
Writes an authorization key.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in,out] | level | requested access level (in) and responsed access level (out) |
[in] | key | authorize key |
kdriveExpress_API error_t kdrive_sp_load_state_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t * | load_state | ||
) |
Reads the load state via PropertyValueRead (PID_LOAD_STATE_CONTROL).
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[out] | load_state | load state |
kdriveExpress_API error_t kdrive_sp_load_state_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | load_event, | ||
uint8_t * | load_state | ||
) |
Writes the load state via PropertyValueWrite (PID_LOAD_STATE_CONTROL).
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | load_event | load event |
[out] | load_state | load state |
kdriveExpress_API error_t kdrive_sp_load_state_write_ex | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | load_event, | ||
const uint8_t | additional_info[KDRIVE_LOAD_STATE_ADDITIONAL_INFO_LEN], | ||
uint8_t * | load_state | ||
) |
Writes the load state via PropertyValueWrite (PID_LOAD_STATE_CONTROL).
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | load_event | load event |
[in] | additional_info | additional load information |
[out] | load_state | load state |
kdriveExpress_API error_t kdrive_sp_memory_block_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t * | memory_addr, | ||
uint8_t | number, | ||
uint8_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads a contiguous memory block via DMA.
The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the memory block to be read. The max size of the buffer must be passed in as data_length. data_length will be updated to correspond to the length of the memory read.
The service supports the reading of blocks where the exact start and end address in unknown.
For example, we want to read from 0x4000 and read 512 bytes.
The following cases are possible:
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in,out] | memory_addr | start memory address (in), start address of the first valid data (out) |
[in] | number | number of octet to be read |
[out] | data | the memory data read from the device |
[in,out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_memory_block_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | memory_addr, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes a contiguous memory block via DMA.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | data | the data array |
[in] | data_length | the length of the data array |
kdriveExpress_API error_t kdrive_sp_memory_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | memory_addr, | ||
uint8_t | number, | ||
uint8_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads data via DMA.
The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the property value to be read. The max size of the buffer must be passed in as data_length. data_length will be updated to correspond to the length of the value read.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | number | number of octet to be read |
[out] | data | the memory data read from the device |
[in,out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_memory_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | memory_addr, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes data via DMA.
The field data from the A_Memory_Response will verify with the field data from the A_Memory_Write.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | data | the data array |
[in] | data_length | the length of the data array |
kdriveExpress_API error_t kdrive_sp_memory_write_without_verify | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | memory_addr, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Writes data via DMA.
This service do not verify the field data from the A_Memory_Response. The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the response (normally the same size as the input_data_length). The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | input_data | the input data array |
[in] | input_data_length | the length of the input_data array |
[out] | output_data | the output data (from the response) |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |
kdriveExpress_API error_t kdrive_sp_network_param_write_broadcast | ( | int32_t | sp, |
uint16_t | object_type, | ||
uint8_t | prop_id, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes a parameter with the NetworkParameterWriteBroadcast service.
Sends the service as broadcast.
[in] | sp | the service port descriptor |
[in] | object_type | the object type |
[in] | prop_id | the property id |
[in] | data | the data to write |
[in] | data_length | the length of the data to write |
kdriveExpress_API error_t kdrive_sp_network_param_write_systembroadcast | ( | int32_t | sp, |
uint16_t | object_type, | ||
uint8_t | prop_id, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes a parameter with the NetworkParameterWriteBroadcast service.
Sends the service as system broadcast.
[in] | sp | the service port descriptor |
[in] | object_type | the object type |
[in] | prop_id | the property id |
[in] | data | The data to write |
[in] | data_length | the length of the data to write |
kdriveExpress_API error_t kdrive_sp_prop_value_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | prop_id, | ||
uint8_t | nr_of_elems, | ||
uint16_t | start_index, | ||
uint8_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads a property value from a device The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the property value to be read.
The max size of the buffer must be passed in as data_length. data_length will be updated to correspond to the length of the value read.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | Object Index |
[in] | prop_id | Property ID |
[in] | nr_of_elems | Element Count |
[in] | start_index | Start Index |
[out] | data | the property value read from the device |
[in,out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_prop_value_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | prop_id, | ||
uint8_t | nr_of_elems, | ||
uint16_t | start_index, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes the value of a property to a device.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | prop_id | property id |
[in] | nr_of_elems | element count |
[in] | start_index | start index |
[in] | data | the data array |
[in] | data_length | the length of the data array |
kdriveExpress_API error_t kdrive_sp_prop_value_write_without_verify | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | prop_id, | ||
uint8_t | nr_of_elems, | ||
uint16_t | start_index, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Writes the value of a property to a device.
This function do not verify the field data from the A_PropertyValue_Response. The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the response (normally the same size as the input_data_length). The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | prop_id | property id |
[in] | nr_of_elems | element count |
[in] | start_index | start index |
[in] | input_data | the input data array |
[in] | input_data_length | the length of the input_data array |
[out] | output_data | the output data (from the response) |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |
kdriveExpress_API error_t kdrive_sp_property_description_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | object_index, | ||
uint8_t | prop_id, | ||
uint8_t | prop_index, | ||
property_description_t * | property_description | ||
) |
Reads a property description from a device.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | object_index | object index |
[in] | prop_id | property iD |
[in] | prop_index | property index |
[out] | property_description | property description (write enabled, read level, ...) |
kdriveExpress_API error_t kdrive_sp_read_prog_mode | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t * | enabled | ||
) |
Reads the current programming mode.
Reads the mask version first an determines the realization type from it
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[out] | enabled | Is the programming mode enabled |
kdriveExpress_API error_t kdrive_sp_read_prog_mode_mask_based | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | mask_version, | ||
bool_t * | enabled | ||
) |
Reads the current programming mode.
Use the given mask version to determine which realization type is suitable. Mask version can be manually set or read via kdrive_sp_device_descriptor_type0_read (commercial only)
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | mask_version | the mask version |
[out] | enabled | Is the programming mode enabled |
kdriveExpress_API error_t kdrive_sp_read_prog_mode_memory_mapped | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t * | enabled | ||
) |
Reads the current programming mode via MemoryRead.
Memory Address 0x0060
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[out] | enabled | Is the programming mode enabled |
kdriveExpress_API error_t kdrive_sp_read_prog_mode_property_based | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t * | enabled | ||
) |
Reads the current programming mode via PropertyValueRead.
PID_PROG_MODE
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[out] | enabled | Is the programming mode enabled |
kdriveExpress_API bool_t kdrive_sp_release | ( | int32_t | sp | ) |
Releases the ServicePort interface.
This should be the last function called when working with the services library. Returns true if successfully released false otherwise (i.e. the descriptor wasn't found).
[in] | sp | the service port descriptor |
kdriveExpress_API error_t kdrive_sp_restart_device_type0 | ( | int32_t | sp, |
uint16_t | ind_addr | ||
) |
Restarts the device using restart (type 0) There is no response to this telegram so it is not possible to know when the device is ready.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
kdriveExpress_API error_t kdrive_sp_restart_device_type1 | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint8_t | erase_code, | ||
uint8_t | channel_number, | ||
uint8_t * | error_code, | ||
uint16_t * | process_time | ||
) |
Restarts the device using restart (type 1)
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | erase_code | erase code |
[in] | channel_number | channel number |
[out] | error_code | error code |
[out] | process_time | process time |
kdriveExpress_API error_t kdrive_sp_set_co | ( | int32_t | sp, |
bool_t | connection_oriented | ||
) |
Sets whether the device services are run as connection-oriented or connection-less.
The default is connection-less.
[in] | sp | the service port descriptor |
[in] | connection_oriented | 1: connection-oriented 0: connection-less |
kdriveExpress_API error_t kdrive_sp_set_ext_memory_services_used | ( | int32_t | sp, |
bool_t | ext_used | ||
) |
Sets whether the memory block services use the (new) extended memory services or the 'normal' memory service.
The default is 0 (false) = use standard memory services.
[in] | sp | the service port descriptor |
[in] | ext_used | 1 : extended services 0: standard services |
kdriveExpress_API error_t kdrive_sp_set_max_apdu_length | ( | int32_t | sp, |
uint32_t | max_apdu_length | ||
) |
Sets the maximum apdu length for device services.
The default is 15 (standard frame).
[in] | sp | the service port descriptor |
[in] | max_apdu_length | the maximum apdu length which supports the interface and device |
kdriveExpress_API error_t kdrive_sp_set_response_timeout | ( | int32_t | sp, |
uint32_t | timeout | ||
) |
Sets the response timeout.
If the parameter timeout is 0 than use the service specific default timeout.
[in] | sp | the service port descriptor |
[in] | timeout | response timeout in ms. 0 means use service specific default timeout |
kdriveExpress_API error_t kdrive_sp_switch_prog_mode | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t | enable | ||
) |
Enable / Disable the programming mode (switches the learn LED).
Reads the mask version first an determines the realization type from it
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | enable | enable programming mode |
kdriveExpress_API error_t kdrive_sp_switch_prog_mode_mask_based | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint16_t | mask_version, | ||
bool_t | enable | ||
) |
Enable / Disable the programming mode (switches the learn LED).
Use the given mask version to determine which realization type is suitable. Mask version can be manually set or read via kdrive_sp_device_descriptor_type0_read (commercial only)
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | mask_version | the mask version |
[in] | enable | enable programming mode |
kdriveExpress_API error_t kdrive_sp_switch_prog_mode_memory_mapped | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t | enable | ||
) |
Enable / Disable the programming mode (switches the learn LED).
Reads the current value via service MemoryRead and writes the new value via MemoryWrite. Memory Address 0x0060
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | enable | enable programming mode |
kdriveExpress_API error_t kdrive_sp_switch_prog_mode_property_based | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
bool_t | enable | ||
) |
Enable / Disable the programming mode (switches the learn LED).
Reads the current value via service PropertyValueRead and writes the new value via PropertyValueWrite. PID_PROG_MODE
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | enable | enable programming mode |
kdriveExpress_API error_t kdrive_sp_system_network_param_read | ( | int32_t | sp, |
uint16_t | object_type, | ||
uint16_t | prop_id, | ||
const uint8_t | data[], | ||
uint32_t | data_length, | ||
uint32_t | wait_time, | ||
system_network_param_read_t | items[], | ||
uint32_t * | items_length | ||
) |
Reads system parameter with the SystemNetworkParameterRead service.
[in] | sp | the service port descriptor |
[in] | object_type | the object type |
[in] | prop_id | the property id |
[in] | data | The test info to send |
[in] | data_length | the length of the test info to send |
[in] | wait_time | the time to wait in milliseconds for all responses, i.e. 2500ms or so |
[out] | items | the array of (individual address, test info and result) items generated by the service |
[in,out] | items_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_system_network_param_write | ( | int32_t | sp, |
uint16_t | object_type, | ||
uint16_t | prop_id, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes a system parameter with the SystemNetworkParameterWrite service.
[in] | sp | the service port descriptor |
[in] | object_type | the object type |
[in] | prop_id | the property id |
[in] | data | The data to write |
[in] | data_length | the length of the data to write |
kdriveExpress_API error_t kdrive_sp_user_memory_read | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | memory_addr, | ||
uint8_t | number, | ||
uint8_t | data[], | ||
uint32_t * | data_length | ||
) |
Reads data via DMA.
The data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the property value to be read. The max size of the buffer must be passed in as data_length. data_length will be updated to correspond to the length of the value read.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | number | number of octet to be read |
[out] | data | the memory data read from the device |
[out] | data_length | the data array capacity (in) and actual length of the data array (out) |
kdriveExpress_API error_t kdrive_sp_user_memory_write | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | memory_addr, | ||
const uint8_t | data[], | ||
uint32_t | data_length | ||
) |
Writes data via DMA.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | data | the data array |
[in] | data_length | the length of the data array |
kdriveExpress_API error_t kdrive_sp_user_memory_write_without_verify | ( | int32_t | sp, |
uint16_t | ind_addr, | ||
uint32_t | memory_addr, | ||
const uint8_t | input_data[], | ||
uint32_t | input_data_length, | ||
uint8_t | output_data[], | ||
uint32_t * | output_data_length | ||
) |
Writes data via DMA.
This service do not verify the field data from the A_UserMemory_Response. The output_data buffer must exist (should be pre-allocated by the user) and its size should be equal to or greater than the output value of the response (normally the same size as the input_data_length). The max size of the buffer must be passed in as output_data_length. output_data_length will be updated to correspond to the length of the value response.
[in] | sp | the service port descriptor |
[in] | ind_addr | individual address |
[in] | memory_addr | start memory address |
[in] | input_data | the input data array |
[in] | input_data_length | the length of the input_data array |
[out] | output_data | the output data (from the response) |
[in,out] | output_data_length | the output_data array capacity (in) and actual length of the output_data array (out) |