1.2.6.4.11 SRV_USI_HANDLE_INVALID Macro

C

#define SRV_USI_HANDLE_INVALID  (((SRV_USI_HANDLE) -1))

Summary

Definition of invalid USI handle.

Description

This definition is used to indicate that an USI handle (SRV_USI_HANDLE Typedef) is invalid. SRV_USI_Open returns this value if:

  • the specified instance has been already opened.

  • the instance being opened is not initialized or is invalid.

  • if there is an error opening the serial interface (USB CDC instances only)

Remarks

The handle returned from SRV_USI_Open should be checked to ensure it is different to SRV_USI_HANDLE_INVALID before attempting to call any other USI routine using the handle.