comparison packages/hal/sh/cq7708/current/include/plf_stub.h @ 105:5a0cc6c243a9 ecos-sw-2000-06-30

Merge from eCos master repository on 2000-06-30-08:18:49-BST
author jlarmour
date Fri, 30 Jun 2000 16:27:35 +0000
parents 4642a6d35749
children 25e238959bae
comparison
equal deleted inserted replaced
104:ad66e26a9e7c 105:5a0cc6c243a9
45 //============================================================================= 45 //=============================================================================
46 46
47 #include <pkgconf/system.h> 47 #include <pkgconf/system.h>
48 #include <pkgconf/hal.h> 48 #include <pkgconf/hal.h>
49 49
50 #ifdef CYGPKG_IO_SERIAL
51 #include <pkgconf/io_serial.h>
52 #endif
53
54 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS 50 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
55 51
56 #include <cyg/infra/cyg_type.h> // CYG_UNUSED_PARAM, externC 52 #include <cyg/infra/cyg_type.h> // CYG_UNUSED_PARAM, externC
57 53
58 #include <cyg/hal/sh_stub.h> // architecture stub support 54 #include <cyg/hal/sh_stub.h> // architecture stub support
59 55
60 #include <cyg/hal/hal_diag.h> // hal_diag_led_on 56 #include <cyg/hal/hal_diag.h> // hal_diag_led_on
61 57
62 //---------------------------------------------------------------------------- 58 //----------------------------------------------------------------------------
63 // Define serial stuff. 59 // Define some platform specific communication details. This is mostly
64 externC void hal_sci_stub_init_serial( void ); 60 // handled by hal_if now, but we need to make sure the comms tables are
65 externC int hal_sci_stub_get_char( void ); 61 // properly initialized.
66 externC void hal_sci_stub_put_char( int c );
67 externC int hal_sci_stub_interruptible( int state );
68 externC void hal_sci_stub_init_break_irq( void );
69 62
70 #define HAL_STUB_PLATFORM_INIT_SERIAL() hal_sci_stub_init_serial() 63 externC void cyg_hal_plf_comms_init(void);
71 #define HAL_STUB_PLATFORM_GET_CHAR() hal_sci_stub_get_char() 64
72 #define HAL_STUB_PLATFORM_PUT_CHAR(c) hal_sci_stub_put_char((c)) 65 #define HAL_STUB_PLATFORM_INIT_SERIAL() cyg_hal_plf_comms_init()
66
73 #define HAL_STUB_PLATFORM_SET_BAUD_RATE(baud) CYG_UNUSED_PARAM(int, (baud)) 67 #define HAL_STUB_PLATFORM_SET_BAUD_RATE(baud) CYG_UNUSED_PARAM(int, (baud))
74 #define HAL_STUB_PLATFORM_INTERRUPTIBLE (&hal_sci_stub_interruptible) 68 #define HAL_STUB_PLATFORM_INTERRUPTIBLE 0
75 #define HAL_STUB_PLATFORM_INIT_BREAK_IRQ() hal_sci_stub_init_break_irq()
76 69
77 //---------------------------------------------------------------------------- 70 //----------------------------------------------------------------------------
78 // Stub initializer. 71 // Stub initializer.
79 #ifdef CYGSEM_HAL_ROM_MONITOR 72 #ifdef CYGSEM_HAL_ROM_MONITOR
80 # define HAL_STUB_PLATFORM_INIT() hal_diag_led_on() 73 # define HAL_STUB_PLATFORM_INIT() hal_diag_led_on()
81 #else 74 #else
82 # define HAL_STUB_PLATFORM_INIT() CYG_EMPTY_STATEMENT 75 # define HAL_STUB_PLATFORM_INIT() CYG_EMPTY_STATEMENT
83 #endif 76 #endif
84 77
78 #endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
79
85 //---------------------------------------------------------------------------- 80 //----------------------------------------------------------------------------
86 // Reset. 81 // Reset.
87 // Block interrupts and cause an exception. This forces a reset. 82 // Block interrupts and cause an exception. This forces a reset.
88 #define HAL_STUB_PLATFORM_RESET() \ 83 #define HAL_STUB_PLATFORM_RESET() \
89 asm volatile ("ldc %0,sr;trapa #0x00;" : : "r" (CYGARC_REG_SR_BL)) 84 asm volatile ("ldc %0,sr;trapa #0x00;" : : "r" (CYGARC_REG_SR_BL))
90 85
91 86 #define HAL_STUB_PLATFORM_RESET_ENTRY 0xa0000000
92 #endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
93 87
94 //----------------------------------------------------------------------------- 88 //-----------------------------------------------------------------------------
95 #endif // CYGONCE_HAL_PLF_STUB_H 89 #endif // CYGONCE_HAL_PLF_STUB_H
96 // End of plf_stub.h 90 // End of plf_stub.h