Platforms

CANpie

LI_CAN_SLV_PORT_H_
LI_CAN_SLV_PORT_STATIC_INLINE

LI_CAN_SLV_PORT_STATIC_INLINE.

li_can_slv_port_get_system_ticks()

li_can_slv_port_get_system_ticks

li_can_slv_port_disable_irq()

li_can_slv_port_disable_irq

li_can_slv_port_enable_irq()

li_can_slv_port_enable_irq

li_can_slv_port_memory_cmp(ptr1, ptr2, size)

This functions compares the first size bytes of memory regions ptr1 and ptr2.

Return

return (int)

indicates

<0

the first byte that does not match in both memory blocks has a lower value in ptr1 than in ptr2 (if evaluated as unsigned char values)

0

the contents of both memory blocks are equal

>0

the first byte that does not match in both memory blocks has a greater value in ptr1 than in ptr2 (if evaluated as unsigned char values)

Parameters
  • ptr1: The Pointer to the first memory region to compare (const void *)

  • ptr2: The Pointer to the second memory region to compare (const void *)

  • size: The number of bytes to compare with each other (size_t size)

li_can_slv_port_memory_cpy(dest, source, size)

This function copies size bytes from source to dest.

Return

the destination is returned (void *)

Parameters
  • dest: The pointer to the destination memory region (void *)

  • source: The pointer to the source memory region (const void *)

  • size: The number of bytes to copy (size_t size)

li_can_slv_port_memory_set(ptr, value, num)

This function sets the first num bytes of the block of memory pointed by ptr to the specified value (interpreted as an unsigned char).

Return

ptr ist returned (void *)

Parameters
  • ptr: Pointer to the destination memory region to set (void *)

  • value: Value to be set. (int)

  • num: The number of bytes to be set to the value. (size_t)

li_can_slv_port_string_cmp(str1, str2)

This function compares the C string str1 to the C string str2.

Return

return (int)

indicates

<0

the first character that does not match has a lower value in str1 than in str2

0

the contents of both strings are equal

>0

the first character that does not match has a greater value in str1 than in str2

Parameters
  • str1: First string to be compared. (const char *)

  • str2: Second string to be compared. (const char *)

li_can_slv_port_string_n_cmp(str1, str2, num)

This function compares up to num characters of the C string str1 to those of the C string str2.

Return

return (int)

indicates

<0

the first character that does not match has a lower value in str1 than in str2

0

the contents of both strings are equal

>0

the first character that does not match has a greater value in str1 than in str2

Parameters
  • str1: First string to be compared. (const char *)

  • str2: Second string to be compared. (const char *)

  • num: Maximum number of characters to compare (size_t)

li_can_slv_port_string_cpy(dest, source)

Return

The destination is returned (char *)

Parameters
  • dest: Pointer to the destination buffer where the content is to be copied. (char *)

  • source: The source C string (char *)

li_can_slv_port_string_n_cpy(dest, source, size)

This function copies the first size characters of source to destination.

If the end of the source C string (which is signaled by a null-character) is found before size characters have been copied, destination is padded with zeros until a total of size characters have been written to it.

Return

size Maximum number of characters to copied (size_t)

Parameters
  • dest: Pointer to the destination buffer where the content is to be copied (char *)

  • source: C string to be copied (const char *)

  • size: Maximum number of characters to copy (size_t)

li_can_slv_port_get_boot_kernel_version_major()

li_can_slv_port_get_boot_kernel_version_major <= 9

li_can_slv_port_get_boot_kernel_version_minor()

li_can_slv_port_get_boot_kernel_version_minor <= 999

li_can_slv_port_get_modul_software_version_major()

li_can_slv_port_get_modul_software_version_major <= 9

li_can_slv_port_get_modul_software_version_minor()

li_can_slv_port_get_modul_software_version_minor <= 999

Tip

The Liebherr CAN Protocol uses a major.minor versioning scheme. So theoretically it is possible to us a version number like 255.65535. But in practice do not use numbers above 9.999. Increment the major version when you make an incompatible API change, and increment the minor when you add a functionality in a backwards-compatible manner. The boot kernel version represents the version of the boot loader and the module software version is used for the application running on that device. If no boot loader is present on that device use the same number for boot kernel and module software.

li_can_slv_port_get_identnumber()

li_can_slv_port_get_identnumber

li_can_slv_port_get_changeindex()

li_can_slv_port_get_changeindex

li_can_slv_port_get_serialnumber()

li_can_slv_port_get_serialnumber

li_can_slv_port_sw_reset()

li_can_slv_port_sw_reset