AnsweredAssumed Answered

MQX-3.7 with itty no output

Question asked by Gavin Li on Jun 22, 2012
Latest reply on Jul 4, 2012 by Gavin Li

Hi,

my program works fine when I use "ttye:" as default console, but after I recompiled the psp and bsp to use "ittye:", there is no output on the default console.

please help with any clue. Thanks.

 

user_config.h

#define BSPCFG_ENABLE_TTYE       0
#define BSPCFG_ENABLE_ITTYE      1

 


twrk60n512.h

    #if BSPCFG_ENABLE_ITTYE
        #define BSP_DEFAULT_IO_CHANNEL                        "ittye:"

        #define BSP_DEFAULT_IO_CHANNEL_DEFINED          
 #else
        #define BSP_DEFAULT_IO_CHANNEL                        NULL
    #endif

#ifndef BSP_DEFAULT_IO_OPEN_MODE
//    #define BSP_DEFAULT_IO_OPEN_MODE                          (pointer) (IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO)
    #define BSP_DEFAULT_IO_OPEN_MODE                          (pointer) (IO_SERIAL_RAW_IO /* | IO_SERIAL_NON_BLOCKING*/ )
#endif

 


 

my code

    // read from ittyf and write to ittye(default console)

    fd = fopen ("ittyf:", (pointer) (IO_SERIAL_RAW_IO));
    for (;:smileywink:
    {
        i=fread(&data, 1, 1, fd);
        if putchar(data);

    }


 

Outcomes