- /*****************************************************************************
- File Name : app_data.h
- Description : Global Application header
- Copyright (C) 2004 STMicroelectronics
- *****************************************************************************/
- /* Define to prevent recursive inclusion */
- #ifndef __APP_DATA_H
- #define __APP_DATA_H
- /* Includes ------------------------------------------------------------ */
- /* Exported Types ------------------------------------------------------ */
- /* Exported Constants -------------------------------------------------- */
- /* Exported Variables -------------------------------------------------- */
- #ifdef GLOBAL_DATA
- #define DATA
- ST_DeviceName_t BOOTDeviceName = "BOOT";
- #if defined(MB400MB) || defined(MALY3)
- ST_DeviceName_t PIODeviceName[] = {"PIO0","PIO1","PIO2","PIO3"};
- #elif defined(MB390MB) || defined(TYLKO3)
- ST_DeviceName_t PIODeviceName[] = {"PIO0","PIO1","PIO2","PIO3","PIO4","PIO5"};
- #endif
- ST_DeviceName_t TBXDeviceName = "TBX";
- ST_DeviceName_t UARTDeviceName = "UART";
- #else
- #define DATA extern
- DATA ST_DeviceName_t BOOTDeviceName;
- DATA ST_DeviceName_t PIODeviceName[];
- DATA ST_DeviceName_t TBXDeviceName;
- DATA ST_DeviceName_t UARTDeviceName;
- #endif
- /* special case */
- extern partition_t *NcachePartition;
- extern partition_t *SystemPartition;
- /* Exported Macros ----------------------------------------------------- */
- /* Array offsets for I2C/PIO devices */
- #define BACK_PIO 3
- #define FRONT_PIO 3
- #if defined(MB400MB) || defined(MALY3)
- #define NUM_PIO_PORTS 4
- #define __FRONTEND "STi5105"
- #if defined(mb400)
- #define __PLATFORM "MB400"
- #endif
- #elif defined(MB390MB) || defined(TYLKO3)
- #define NUM_PIO_PORTS 6
- #define __FRONTEND "STi5100"
- #if defined(mb390)
- #define __PLATFORM "MB390"
- #endif
- #endif
- #define STPIO_PWM_DEVICE_NAME PIODeviceName[1]
- #define STPIO_UART_DEVICE_NAME PIODeviceName[5]
- #define ASC_DEVICE_TYPE STUART_RTSCTS
- #define ASC_0_TXD_BIT PIO_BIT_0
- #define ASC_0_RXD_BIT PIO_BIT_1
- #define ASC_1_TXD_BIT PIO_BIT_0
- #define ASC_1_RXD_BIT PIO_BIT_1
- #define ASC_2_TXD_BIT PIO_BIT_1
- #define ASC_2_RXD_BIT PIO_BIT_2
- #define ASC_3_TXD_BIT PIO_BIT_0
- #define ASC_3_RXD_BIT PIO_BIT_1
- #if defined(MB400MB) || defined(MALY3)
- #define UART_BASE_ADDRESS ASC_1_BASE_ADDRESS
- #define UART_INTERRUPT ASC_1_INTERRUPT
- #define UART_INTERRUPT_LEVEL ASC_1_INTERRUPT_LEVEL
- #define UART_RXD_BIT ASC_1_RXD_BIT
- #define UART_TXD_BIT ASC_1_TXD_BIT
- #elif defined(MB390MB) || defined(TYLKO3)
- #define UART_BASE_ADDRESS ASC_3_BASE_ADDRESS
- #define UART_INTERRUPT ASC_3_INTERRUPT
- #define UART_INTERRUPT_LEVEL ASC_3_INTERRUPT_LEVEL
- #define UART_RXD_BIT ASC_3_RXD_BIT
- #define UART_TXD_BIT ASC_3_TXD_BIT
- #endif
- /* cast for using register_command */
- #define RC_CAST boolean (*)(parse_t*, char*)
- /* Exported Functions -------------------------------------------------- */
- extern char *wts_GetErrorText( ST_ErrorCode_t Error );
- #endif
- /* EOF --------------------------------------------------------------------- */