This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: UART communication


> 

> Can you clarify what you mean by CTS/RTS enabled? How did you 

> enable this?

> Jifl



I enabled it with the cyg_io_set_config-function like this:



cyg_serial_info_t settings_buf;



settings_buf.baud=CYGNUM_SERIAL_BAUD_57600; //had to modify the sources in
aeb_serial.h

settings_buf.stop=CYGNUM_SERIAL_STOP_1;

settings_buf.parity=CYGNUM_SERIAL_PARITY_NONE;

settings_buf.word_length=CYGNUM_SERIAL_WORD_LENGTH_8;

settings_buf.flags=CYG_SERIAL_FLAGS_RTSCTS; //enable CTS/RTS



err = cyg_io_lookup( "/dev/ser0", &ser0_hdl );

if(ENOERR != err)

{

	printf("Couldn't find /dev/ser0 !!\n");

}

len=sizeof(cyg_serial_info_t);

err=cyg_io_set_config(ser0_hdl, CYG_IO_SET_CONFIG_SERIAL_INFO,
&settings_buf, &len);



When checking the Line Status Register after receiving the zero-byte there
is an overrun error. 

The value of LSR is 0x62.

/Andreas

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]