/************************************************************************* module :[読取り原稿サイズの確保] function :[ 1. ] return :[0:SYS_DOCUMENT_A4_SIZE 1:SYS_DOCUMENT_B4_SIZE 2:SYS_DOCUMENT_A3_SIZE ] common :[] condition :[] comment :[戻り値の確認は\src\atlanta\define\sysdoc.hで定義されている値を使用すること ANZUの最大読みとり幅はB4なのでH8用のパスを使用 1995/09/12 Eguchi ポプラはA3読み取りがあるので変更 1996/11/28 By T.Yamaguchi ] machine :[SH7043] language :[SHC] keyword :[CMN] date :[1993/12/13] author :[吉川弘康] *************************************************************************/ UBYTE CMN_GetDocumentScanSize(void) { #if (PRO_SCAN_WIDTH == A3WIDTH) /* A3の機種はこのパスが必要 */ if (DA3()) { /** A document is A3 size **/ switch(CHK_ScanningWidth()) { case SYS_DOCUMENT_A3_SIZE: return(SYS_DOCUMENT_A3_SIZE); case SYS_DOCUMENT_B4_SIZE: return(SYS_DOCUMENT_B4_SIZE); case SYS_DOCUMENT_A4_SIZE: return(SYS_DOCUMENT_A4_SIZE); } } #endif if (DB4()) { /** A document is B4 size **/ switch(CHK_ScanningWidth()) { case SYS_DOCUMENT_A3_SIZE: case SYS_DOCUMENT_B4_SIZE: return(SYS_DOCUMENT_B4_SIZE); case SYS_DOCUMENT_A4_SIZE: return(SYS_DOCUMENT_A4_SIZE); } } else { /** A document is A4 size **/ return(SYS_DOCUMENT_A4_SIZE); } }
void LCD1602::DB(uint8_t data) { RW(false); E(false); DB4(data >> 4); E(true); LCD_DELAY_WRITE; E(false); LCD_DELAY_WRITE; DB4(data & 0x0F); E(true); LCD_DELAY_WRITE; E(false); LCD_DELAY_WRITE; }
void LCD1602::Init() { PinInit(); Brightness(false); RW(false); RS(false); DB4(0); E(false); // Wait 50 ms from power on delay_ms(50); DB4(3); // Run three clock cycles to init E(true); LCD_DELAY_SHORT; E(false); LCD_DELAY_LONG; E(true); LCD_DELAY_SHORT; E(false); LCD_DELAY_SHORT; E(true); LCD_DELAY_SHORT; E(false); LCD_DELAY_SHORT; // Configure display DB4(2); E(true); LCD_DELAY_SHORT; E(false); LCD_DELAY_LONG; DB(0x28); LCD_DELAY_SHORT; DB(0x8); LCD_DELAY_SHORT; DB(0x1); LCD_DELAY_SHORT; DB(0x6); LCD_DELAY_SHORT; RS(false); DB(0x0c); LCD_DELAY_LONG; // Test code, TODO Locate(0, 0); Print(" ld analyzer b1 "); Locate(0, 1); Print(" analyzer-1 "); //Brightness(true); Contrast(false); // Enable SCT peripheral clock CGU_ConfigPWR(CGU_PERIPHERAL_SCT, ENABLE); LPC_CCU1->CLK_M4_SCT_CFG |= CCU1_CLK_M4_SCT_CFG_RUN_Msk; while(!(LPC_CCU1->CLK_M4_SCT_STAT & CCU1_CLK_M4_SCT_STAT_RUN_Msk)); scu_pinmux(0x1, 5, GPIO_PUP, FUNC1); // CTOUT_10 LPC_SCT->CONFIG = (1 << 17); LPC_SCT->CTRL_L |= (12-1) << 5; LPC_SCT->MATCHREL[0].L = 100-1; LPC_SCT->MATCHREL[1].L = 1; LPC_SCT->EVENT[0].STATE = 0xFFFFFFFF; LPC_SCT->EVENT[0].CTRL = (1 << 12); LPC_SCT->EVENT[1].STATE = 0xFFFFFFFF; LPC_SCT->EVENT[1].CTRL = (1 << 12) | (1 << 0); LPC_SCT->OUT[10].SET = (1 << 0); LPC_SCT->OUT[10].CLR = (1 << 1); LPC_SCT->CTRL_L &= ~(1 << 2); InitFont(); // Fade in for (int i = 0; i < 100; i++) { LPC_SCT->MATCHREL[1].L = i; delay_ms(10); } }