comparison packages/io/serial/current/src/common/haldiag.c @ 115:6ed91473a1cd ecos-sw-2000-08-21

Merge from eCos master repository on 2000-08-21-22:40:54-BST
author jlarmour
date Fri, 25 Aug 2000 17:32:38 +0000
parents bf00f99aec69
children e0c0827131d1
comparison
equal deleted inserted replaced
114:5ad2b71d525e 115:6ed91473a1cd
51 #include <cyg/hal/hal_diag.h> 51 #include <cyg/hal/hal_diag.h>
52 52
53 static bool haldiag_init(struct cyg_devtab_entry *tab); 53 static bool haldiag_init(struct cyg_devtab_entry *tab);
54 static bool haldiag_putc(serial_channel *chan, unsigned char c); 54 static bool haldiag_putc(serial_channel *chan, unsigned char c);
55 static unsigned char haldiag_getc(serial_channel *chan); 55 static unsigned char haldiag_getc(serial_channel *chan);
56 static bool haldiag_set_config(serial_channel *chan, cyg_serial_info_t *config); 56 static Cyg_ErrNo haldiag_set_config(serial_channel *chan, cyg_uint32 key,
57 const void *xbuf, cyg_uint32 *len);
57 58
58 static SERIAL_FUNS(haldiag_funs, 59 static SERIAL_FUNS(haldiag_funs,
59 haldiag_putc, 60 haldiag_putc,
60 haldiag_getc, 61 haldiag_getc,
61 haldiag_set_config, 62 haldiag_set_config,
111 unsigned char c; 112 unsigned char c;
112 HAL_DIAG_READ_CHAR(c); 113 HAL_DIAG_READ_CHAR(c);
113 return c; 114 return c;
114 } 115 }
115 116
116 static bool 117 static Cyg_ErrNo
117 haldiag_set_config(serial_channel *chan, cyg_serial_info_t *config) 118 haldiag_set_config(serial_channel *chan, cyg_uint32 key, const void *xbuf,
119 cyg_uint32 *len)
118 { 120 {
119 diag_printf("%s\n", __FUNCTION__); 121 switch (key) {
120 return true; 122 case CYG_IO_SET_CONFIG_SERIAL_INFO:
123 diag_printf("%s\n", __FUNCTION__);
124 return ENOERR;
125 default:
126 return -EINVAL;
127 }
121 } 128 }
122 #endif // CYGPKG_IO_SERIAL_HALDIAG 129 #endif // CYGPKG_IO_SERIAL_HALDIAG