1 of 1 people found this helpful
Please use the API CyU3PDebugStringPrint(); for implementing snprintf();. This API make use of following parameters as shown in its definition.
uint8_t *buffer, /**< Buffer into which the data is to be printed. */
uint16_t maxLength, /**< Buffer size. */
char *fmt, /**< Format specifier string. */
... /**< Variable argument list. */
I have implemented your requirement as shown below.
uint8_t n =5;
CyU3PDebugStringPrint ((uint8_t*)c1, 20, "He has %d books.\n", n);
I got the following output in teraterm.