This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: hal_diag files
- From: Gary Thomas <gthomas at redhat dot com>
- To: Tristan CORCELLE <tco at teamlog dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 31 May 2002 21:30:44 -0600
- Subject: Re: [ECOS] hal_diag files
- References: <01b201c208a3$80989550$3902140a@teamlog.fr>
On Fri, 2002-05-31 at 07:03, Tristan CORCELLE wrote:
> Hi all,
>
> In the most of files "hal_diag.c", there is:
>
> typedef struct {
> cyg_uint8* base;
> cyg_int32 msec_timeout;
> int isr_vector;
> } channel_data_t;
>
> Can anybody tell me where "base" is defined ?
>
There is typically a static table in the driver file which initializes
this structure. For example, in the SA11x0 driver:
static channel_data_t ser_channels[] = {
#if CYGHWR_HAL_ARM_SA11X0_UART1 != 0
{ (volatile struct sa11x0_serial*)SA11X0_UART1_BASE, 1000,
CYGNUM_HAL_INTERRUPT_UART1, CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD },
#endif
#if CYGHWR_HAL_ARM_SA11X0_UART3 != 0
{ (volatile struct sa11x0_serial*)SA11X0_UART3_BASE, 1000,
CYGNUM_HAL_INTERRUPT_UART3, CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD },
#endif
};
In this case, "base" is SA11X0_UART1_BASE which is defined in one of the
platform HAL include files.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss