Trying to create a simple serial driver

j_huber wrote on Monday, November 12, 2007:

I have been trying to create a simple serial driver for the ARM9_STR912. It is supposed to take a single char from serial input and send it back. I can not seem to get it to work, can anybody tell me what I am doing wrong? the code is below.

xTaskCreate( prvRunSerial, "SER", configMINIMAL_STACK_SIZE, NULL, mainMSG_TASK_PRIORITY, NULL );

static void prvRunSerial(void)
xComPortHandle portHandle;
signed portCHAR inputChar;
portCHAR testString[1];

        portHandle = xSerialPortInitMinimal(9600, 1200);
        for( ;; ){
          if(xSerialGetChar(portHandle, &inputChar, 300)){
            testString[0] = inputChar;
            vSerialPutString(portHandle, &testString, 1);
          vTaskDelay( mainLCD_DELAY );