32.3.7 DBPUTWORD(int w)

Description

Writes a 32-bit integer word to the APPOUT mechanism. Available only for the APPIN/APPOUT mechanism, not for the PIC32 Starter Kit mechanism.

Include

<sys/appio.h>

Remarks

Behaves as ((void)0) when APPIN/APPOUT is not enabled via the -mappio-debug or –DPIC32_STARTER_KIT option.

Example Code

#include <p32xxxx.h>

int main (void)

{

    int num;

    char buf[256] ={0};

    DBINIT();



    while(1)

    {

      DBPRINTF ("Hello there!\n");

      DBPRINTF ("Enter a string\n");

#if defined(__APPIO_DEBUG)

      DBSCANF ("%s", &buf[0]);

#elif defined(PIC32_STARTER_KIT)

      DBGETS  (&buf[0],128);

#endif

      DBPRINTF ("Entered \”%s\”\n\n", &buf[0]);


      
      printf ("Prints to UART2 by default or APPOUT when enabled\n");

    }

  return 0;
}