12 Replies Latest reply on Jun 21, 2016 1:44 AM by JoMe_264151

    printf () functions how to redirect serial port  on the PSOC BLE



        I want to use the Printf () function to print the serial port information.


      For example:




              UART_SpiUartPutArray("Helon Test\r\n",sizeof("Helon Test\r\n"));//Uart can print the serial port information.


        Now,i want to do like this:


              printf("Helon Test\r\n");//"Helon Test\r\n" receviced by serial tool.


      so,my question is how can i do to print the serial port information by printf() function?And the _Write () function has been rewrited,but printf("Helon Test\r\n") still can't print the serial port information.the _Write () function as follow:


      int _write(int file, char *ptr, int len)
          int i;
          file = file;
          for (i = 0; i < len; i++)
          return len;