Download LIN 2.1 Driver Suite Slave Node User's Guide
Transcript
UM1716 API Table 17. Read configuration (continued) ld_read_configuration Parameters ifc – the interface to address data – structure that will contain the NAD and all the n PIDs for the frames of the specified NAD length – length of data (1+n, NAD+PIDs) Return LD_READ_OK If the service was successful. LD_LENGTH_TOO_SHORT If the configuration size is greater than the length. It means that the data area does not contain a valid configuration. Table 18. Set configuration ld_set_configuration Prototype 3.4.2 l_u8 ld_set_configuration (l_ifc_handle ifc, const l_u8 *const data, l_u16 length); Availability Slave node only Include lin.h Description It configures the NAD and the PIDs according to the configuration given by data. It will not transport anything on the bus. (See [2] section 7.3.1.7) To be called when it wants to restore a saved configuration or set an initial configuration (e.g. coded by I/O pins).It shall be called after calling l_ifc_init(). The caller shall set the size of the data area before calling it. The data contains the NAD and the PIDs and occupies one byte each. The structure of the data is: NAD and then all PIDs for the frames. The order of the PIDs is the same as the frame list in the LDF and NCF (See [2] section 9.2.2.2 and section 8.2.5 respectively). Parameters ifc – the interface to address data – structure containing the NAD and all the n PIDs for the frames of the specified NAD length – length of data (1+n, NAD+PIDs) Return LD_SET_OK If the service was successful. LD_LENGTH_NOT_CORRECT If the required size of the configuration is not equal to the given length. LD_DATA_ERROR The set of configuration could not be made. Diagnostic transport layer Table 19. Initialization ld_init Prototype void ld_init (l_ifc_handle ifc); Availability Master and slave nodes Include lin.h DocID025766 Rev 1 21/62 61