--- /dev/null
+/** ###################################################################\r
+** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.\r
+** Filename : COM0.H\r
+** Project : RTOSDemo\r
+** Processor : MC9S12DP256BCPV\r
+** Beantype : AsynchroSerial\r
+** Version : Bean 02.231, Driver 01.08, CPU db: 2.87.283\r
+** Compiler : Metrowerks HC12 C Compiler\r
+** Date/Time : 19/06/2005, 15:07\r
+** Abstract :\r
+** This bean "AsynchroSerial" implements an asynchronous serial\r
+** communication. The bean supports different settings of \r
+** parity, word width, stop-bit and communication speed,\r
+** user can select interrupt or polling handler.\r
+** Communication speed can be changed also in runtime.\r
+** The bean requires one on-chip asynchronous serial channel.\r
+** Settings :\r
+** Serial channel : SCI0\r
+**\r
+** Protocol\r
+** Init baud rate : 38400baud\r
+** Width : 8 bits\r
+** Stop bits : 1\r
+** Parity : none\r
+** Breaks : Disabled\r
+**\r
+** Registers\r
+** Input buffer : SCI0DRL [207]\r
+** Output buffer : SCI0DRL [207]\r
+** Control register : SCI0CR1 [202]\r
+** Mode register : SCI0CR2 [203]\r
+** Baud setting reg. : SCI0BD [200]\r
+** Special register : SCI0SR1 [204]\r
+**\r
+** Input interrupt\r
+** Vector name : INT_SCI0\r
+** Priority : 1\r
+**\r
+** Output interrupt\r
+** Vector name : INT_SCI0\r
+** Priority : 1\r
+**\r
+** Used pins : \r
+** ----------------------------------------------------\r
+** Function | On package | Name\r
+** ----------------------------------------------------\r
+** Input | 89 | PS0_RxD0\r
+** Output | 90 | PS1_TxD0\r
+** ----------------------------------------------------\r
+**\r
+**\r
+** Used baud modes :\r
+** ----------------------------------------------------\r
+** No. | Mode ID | Baud rate\r
+** ----------------------------------------------------\r
+** 0 | Bm_38400baud | 38400baud\r
+** 1 | Bm_19200baud | 19200baud\r
+** 2 | Bm_9600baud | 9600baud\r
+** 3 | Bm_4800baud | 4800baud\r
+** ----------------------------------------------------\r
+** Contents :\r
+** SetBaudRateMode - byte COM0_SetBaudRateMode(byte Mod);\r
+**\r
+** (c) Copyright UNIS, spol. s r.o. 1997-2002\r
+** UNIS, spol. s r.o.\r
+** Jundrovska 33\r
+** 624 00 Brno\r
+** Czech Republic\r
+** http : www.processorexpert.com\r
+** mail : info@processorexpert.com\r
+** ###################################################################*/\r
+\r
+#ifndef __COM0\r
+#define __COM0\r
+\r
+/* MODULE COM0. */\r
+\r
+#include "Cpu.h"\r
+\r
+#define COM0_Bm_38400baud 0 /* Constant for switch to mode 0 */\r
+#define COM0_Bm_19200baud 1 /* Constant for switch to mode 1 */\r
+#define COM0_Bm_9600baud 2 /* Constant for switch to mode 2 */\r
+#define COM0_Bm_4800baud 3 /* Constant for switch to mode 3 */\r
+\r
+\r
+\r
+#ifndef __BWUserType_tItem\r
+#define __BWUserType_tItem\r
+ typedef struct { /* Item of the index table for possible baudrates */\r
+ word div; /* divisior */\r
+ byte val; /* values of the prescalers */\r
+ } tItem;\r
+#endif\r
+#ifndef __BWUserType_COM0_TError\r
+#define __BWUserType_COM0_TError\r
+typedef union {\r
+ byte err;\r
+ struct {\r
+ bool OverRun : 1; /* OverRun error flag */\r
+ bool Framing : 1; /* Framing error flag */\r
+ bool Parity : 1; /* Parity error flag */\r
+ bool RxBufOvf : 1; /* Rx buffer full error flag */\r
+ bool Noise : 1; /* Noise error */\r
+ bool Break : 1; /* Break detect */\r
+ bool Idle : 1; /* Idle characted */\r
+ }errName;\r
+} COM0_TError;\r
+#endif\r
+#ifndef __BWUserType_TDirection\r
+#define __BWUserType_TDirection\r
+ typedef enum { /* */\r
+ TXD_INPUT,\r
+ TXD_OUTPUT\r
+ } TDirection;\r
+#endif\r
+\r
+#ifndef __BWUserType_COM0_TComData\r
+#define __BWUserType_COM0_TComData\r
+ typedef byte COM0_TComData ; /* User type for communication. Size of this type depends on the communication data witdh. */\r
+#endif\r
+\r
+#pragma CODE_SEG COM0_CODE /* Code section for this module. */\r
+\r
+byte COM0_SetBaudRateMode(byte Mod);\r
+/*\r
+** ===================================================================\r
+** Method : COM0_SetBaudRateMode (bean AsynchroSerial)\r
+**\r
+** Description :\r
+** This method changes the channel communication speed (baud\r
+** rate). This method can be used only if you specify a list\r
+** of possible period settings at design time (see <Timing\r
+** dialog box> - Runtime setting - from a list of values).\r
+** Each of these settings constitutes a mode and Processor\r
+** Expert^[TM] assigns them a mode identifier. The prescaler\r
+** and compare values corresponding to each mode are\r
+** calculated at design time. You may switch modes at\r
+** runtime by referring only to a mode identifier. No\r
+** run-time calculations are performed, all the calculations\r
+** are performed at design time.\r
+** Parameters :\r
+** NAME - DESCRIPTION\r
+** Mod - Timing mode to set\r
+** Returns :\r
+** --- - Error code, possible codes:\r
+** ERR_OK - OK\r
+** ERR_SPEED - This device does not work in\r
+** the active speed mode\r
+** ===================================================================\r
+*/\r
+\r
+#pragma CODE_SEG __NEAR_SEG NON_BANKED /* Interrupt section for this module. Placement will be in NON_BANKED area. */\r
+__interrupt void COM0_Interrupt(void);\r
+#pragma CODE_SEG COM0_CODE /* Code section for this module. */\r
+/*\r
+** ===================================================================\r
+** Method : COM0_Interrupt (bean AsynchroSerial)\r
+**\r
+** Description :\r
+** This method is internal. It is used by Processor Expert\r
+** only.\r
+** ===================================================================\r
+*/\r
+\r
+\r
+void COM0_Init(void);\r
+/*\r
+** ===================================================================\r
+** Method : COM0_Init (bean AsynchroSerial)\r
+**\r
+** Description :\r
+** This method is internal. It is used by Processor Expert\r
+** only.\r
+** ===================================================================\r
+*/\r
+\r
+\r
+#pragma CODE_SEG DEFAULT /* Change code section to DEFAULT. */\r
+\r
+/* END COM0. */\r
+\r
+/*\r
+** ###################################################################\r
+**\r
+** This file was created by UNIS Processor Expert 03.33 for \r
+** the Motorola HCS12 series of microcontrollers.\r
+**\r
+** ###################################################################\r
+*/\r
+\r
+#endif /* ifndef __COM0 */\r